Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.1k
refactor(tab-view): Attach event via ref instead of using onPageScroll handler#12658
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Hey@intergalacticspacehighway! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read ourcontribution guidelines. |
✅ Deploy Preview forreact-navigation-example ready!
To edit notification comments on pull requests, go to yourNetlify project configuration. |
@@ -35,8 +35,6 @@ type Props<T extends Route> = PagerProps & { | |||
)=>React.ReactElement; | |||
}; | |||
constuseNativeDriver=Platform.OS!=='web'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Also tested on web, it is usingPanResponderAdapter
there so i guess this change should be fine. but let me know!
Uh oh!
There was an error while loading.Please reload this page.
Motivation
We want to allow passingreanimated event handler to the underlying pager view. This PR partially enables it by unblocking the usage of
onPageScroll
event callback.It would be helpful to add an API to pass reanimated handler in material tabs since it is closely coupled with navigation. It can be used to apply custom animations without relying on
Animated
API (useAnimatedValue
returnsAnimated
value). We can introduceonPageScroll
prop support in tab view and material tabs since it is not used by the tab view anymore.Test plan
Test all the tab examples, the animation should work as expected.