Skip to content

Commit f842aa3

Browse files
committed
docs: update README
1 parent 8644920 commit f842aa3

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

PERFORMANCE.md

Whitespace-only changes.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
[![npm][version-badge]][version]
44
[![MIT License][license-badge]][license]
55

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.
77

88
## Use case
99

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.
1111

1212
## Installation
1313

@@ -28,7 +28,7 @@ It accepts the following props:
2828
- `from`
2929
- `to`
3030

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`.
3232

3333
Usage:
3434

@@ -72,9 +72,9 @@ const animatedValue = useRef(new Animated.Value(0)).current;
7272

7373
## How it works
7474

75-
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.
7676

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.
7878

7979
## Contributing
8080

@@ -89,7 +89,9 @@ MIT
8989
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
9090

9191
[animated.value]: https://reactnative.dev/docs/animated#value
92+
[animated.event]: https://reactnative.dev/docs/animated#event
9293
[reanimated.sharedvalue]: https://docs.swmansion.com/react-native-reanimated/docs/core/useSharedValue/
94+
[reanimated.useevent]: https://docs.swmansion.com/react-native-reanimated/docs/advanced/useEvent
9395
[version-badge]: https://img.shields.io/npm/v/react-native-animated-observer.svg?style=flat-square
9496
[license-badge]: https://img.shields.io/npm/l/react-native-animated-observer.svg?style=flat-square
9597
[version]: https://www.npmjs.com/package/react-native-animated-observer

src/__tests__/index.test.tsx

Whitespace-only changes.

0 commit comments

Comments
 (0)