Skip to content

Ability to as animation driver with useNativeDriver #39

Description

@Noitidart

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions