You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
[![npm][version-badge]][version]
4
4
[![MIT License][license-badge]][license]
5
5
6
-
Helpers that let you observe value of an [`Animated.Value`][animated.value] or [`SharedValue`][reanimated.sharedvalue] and convert between them using native events.
6
+
Helpers that let you observe the value of an [`Animated.Value`][animated.value] or [`SharedValue`][reanimated.sharedvalue] and convert between them using native events.
7
7
8
8
## Use case
9
9
10
-
If you use a component that uses [`Animated`](https://reactnative.dev/docs/animated) and accepts animated values or styles, but you use [`Reanimated`](https://docs.swmansion.com/react-native-reanimated/docs/) for your app's animations, or vice versa. You can convert your values with this library to work with the component.
10
+
This library is useful when you have a component that uses [`Animated`](https://reactnative.dev/docs/animated) and accepts animated values or styles, but you use [`Reanimated`](https://docs.swmansion.com/react-native-reanimated/docs/) for your app's animations, or vice versa. You can use this library to convert your values to work with the component.
11
11
12
12
## Installation
13
13
@@ -28,7 +28,7 @@ It accepts the following props:
28
28
-`from`
29
29
-`to`
30
30
31
-
The `from` and `to` props need to be a pair of [`Animated.Value`][animated.value] and [`SharedValue`][reanimated.sharedvalue] or vice versa. The value passed to `from` will be used to update the value of`to`.
31
+
The `from` and `to` props need to be a pair of [`Animated.Value`][animated.value] and [`SharedValue`][reanimated.sharedvalue] or vice versa. The value passed to `from` will be used to update the value passed to`to`.
The library uses the native event system to observe changes in the values of [`Animated.Value`][animated.value]and[`SharedValue`][reanimated.sharedvalue]. When a value changes, the library emits an event that can be listened to by the components.
75
+
The library renders a native component that receives an [`Animated.Value`][animated.value]or[`SharedValue`][reanimated.sharedvalue] value. When the value changes, the library dispatches an event with the updated value.
76
76
77
-
This event is then used with [`Animated.event`](https://reactnative.dev/docs/animated#event) (with native driver) or [`useEvent`](https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent) to update [`Animated.Value`][animated.value] or [`SharedValue`][reanimated.sharedvalue] respectively depending on the usage.
77
+
This event is then used with [`Animated.event`][animated.event] (with native driver) or [`useEvent`][reanimated.useevent] to update [`Animated.Value`][animated.value] or [`SharedValue`][reanimated.sharedvalue] respectively, depending on the usage.
78
78
79
79
## Contributing
80
80
@@ -89,7 +89,9 @@ MIT
89
89
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
0 commit comments