* Extract any properties whose keys are *not* reserved for customizing your * animations. All hooks use this function, which means `useTransition` props * are reserved for `useSpring` calls, etc.
( props: Props )
| 156 | * are reserved for `useSpring` calls, etc. |
| 157 | */ |
| 158 | function getForwardProps<Props extends ReservedProps>( |
| 159 | props: Props |
| 160 | ): ForwardProps<Props> | undefined { |
| 161 | const forward: any = {} |
| 162 | |
| 163 | let count = 0 |
| 164 | eachProp(props, (value, prop) => { |
| 165 | if (!RESERVED_PROPS[prop]) { |
| 166 | forward[prop] = value |
| 167 | count++ |
| 168 | } |
| 169 | }) |
| 170 | |
| 171 | if (count) { |
| 172 | return forward |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Clone the given `props` and move all non-reserved props |