Skip to content

Commit

Permalink
docs: remove redundant 'worklet'; in useComposedEventHandler (#6078)
Browse files Browse the repository at this point in the history
This PR removes redundant "worklet"; directive in
`useComposedEventHandler` docs.

`onScroll` callbacks in `useAnimatedScrollHandler` are automatically
workletized by our babel plugin.
  • Loading branch information
kacperkapusciak committed Jun 11, 2024
1 parent 8d470ba commit 570feca
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ import Animated, {
function ComposedEventHandlerExample() {
const onScrollHandler1 = useAnimatedScrollHandler({
onScroll(e) {
'worklet';
console.log('Scroll handler 1 onScroll event');
},
});

const onScrollHandler2 = useAnimatedScrollHandler({
onScroll(e) {
'worklet';
console.log('Scroll handler 2 onScroll event');
},
});
Expand Down

0 comments on commit 570feca

Please sign in to comment.