Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/docs/advanced/useEvent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Value indicating whether handler should be rebuilt.

### Returns

The hook returns event handler that will be invoked when native event is dispatched.
The hook returns event handler that will be invoked when native event is dispatched. That handler should be connected to only one component.

## Example

Expand Down
4 changes: 4 additions & 0 deletions docs/docs/scroll/useAnimatedScrollHandler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ The hook returns a handler object that can be hooked into a scrollable container
Note that in order for the handler to be properly triggered, you should use containers that are wrapped with `Animated` (e.g. `Animated.ScrollView` and not just `ScrollView`).
The handler should be passed under `onScroll` parameter regardless of whether it is configured to receive only scroll or also momentum or drag events.

### Remarks

The hook returns a handler that is not supposed to be passed to multiple components. You need a separate handler for each scrollable container.

## Example

In the below example we define a scroll handler by passing a single worklet handler.
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/scroll/useScrollViewOffset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ An optional shared value to be updated with the scroll offset. If not provided a

`useScrollViewOffset` returns a [shared value](/docs/fundamentals/glossary#shared-value) which holds the current offset of the `ScrollView`.

### Remarks

The `animatedRef` passed to the hook mustn't be changed dynamically.

## Example

import ScrollViewOffset from '@site/src/examples/ScrollViewOffset';
Expand Down