Motivation
API known form RN core is much more flexible when it comes to being flexible.
We wanted to make using spring animation easier.
Changes
We didn't want to modify existing spring object so I have added SpringUtils object which is a set of methods for easier spring's config manipulations.
* add useCode hook as an alternative to Animated.Code
* Add useCode documentation to README
Added a short description of Animated.useCode to the README, with both a function signature and an example of its use in a component.
Fix Mapping declaration since [native event can be a function](https://github.com/kmagiera/react-native-reanimated/pull/83)
Otherwise, you will get an error like this:
"Type '{ nativeEvent: ({ translationY: y, state }: { translationY: number; state: State; }) => AnimatedNode<number>; }' is not assignable to type 'Mapping'.
Adds the `<Animated.Code>` component and a props type for a render or `exec` prop. Is it right that this should always return an `AnimatedNode<number>`?
Render prop or `exec` should be exclusive, based on how its implemented (`exec` takes precedence), but my TypeScript experience is too limited to figure that out.
Trying to use reanimated with typescript results in bunch of `Namespace 'Animated' has no exported member 'EasingFunction'` errors because `Animated.EasingFunction` is not being exported.