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

Ability to as animation driver with useNativeDriver #37

Open
Noitidart opened this issue Apr 11, 2018 · 0 comments
Open

Ability to as animation driver with useNativeDriver #37

Noitidart opened this issue Apr 11, 2018 · 0 comments

Comments

@Noitidart
Copy link

Thanks for this awesome module.

I was using it to drive an animation but it is hurting performance. Is there anyway to use it as we use Animation event drivers - https://medium.com/xebia/linking-animations-to-scroll-position-in-react-native-5c55995f5a6e

This connects to scroll of a scroll view:

    const xOffset = new Animated.Value(0);

    const onScroll = Animated.event([{ nativeEvent: { contentOffset: { x: xOffset } } }], { useNativeDriver: true });

    <ScrollView scrollEventThrottle={16} onScroll={onScroll}>
        // ...
    </ScrollView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant