Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Rewrite useHandler page #6345

Merged
merged 6 commits into from
Aug 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change in intro
  • Loading branch information
patrycjakalinska committed Jul 29, 2024
commit 1c7bb130af01174ccf4609044bac7a9a88513355
5 changes: 2 additions & 3 deletions packages/docs-reanimated/docs/advanced/useHandler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ sidebar_position: 5

# useHandler

Lets you find out whether the event handler dependencies have changed.
This is low-level hook returning context object and value indicating whether worklet should be rebuilt, which should be used in order to create custom event handler hook like `useAnimatedGestureHandler` or `useAnimatedScrollHandler`.
`useHandler` is a low-level hook. It returns a context object and a value that tells you if the worklet needs to be rebuilt. You can use it to create custom event handler hooks, like `useAnimatedGestureHandler` or `useAnimatedScrollHandler`.
patrycjakalinska marked this conversation as resolved.
Show resolved Hide resolved

## Reference

Expand Down Expand Up @@ -88,7 +87,7 @@ Each of the event worklets will receive the following parameters when called:

#### `dependencies` <Optional />

Optional array of values which changes cause this hook to receive updated values during rerender of the wrapping component. This matters when, for instance, worklet uses values dependent on the component's state.
Changes in `dependencies` array cause `useHandler` hook to receive updated values during rerender of the wrapping component. This matters when, for instance, worklet uses values dependent on the component's state.

This array may contain:

Expand Down
Loading