Skip to content

Warning from react-native-reanimated about using shared value #78

Description

@sagihsh

Hi!
I am using your library in my Expo app.
Recently I upgraded to Expo SDK 49 which among other things upgraded my react-native-reanimated to ~3.3.0
I am now getting a warning when using the MaterialTabs component, saying:

 WARN  It looks like you might be using shared value's .value inside reanimated inline style. If you want a component to update when shared value changes you should use the shared value directly instead of its current state represented by `.value`. See documentation here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/animations#animations-in-inline-styles 
    at Indicator (http://<my_ip>:8081/node_modules/expo/AppEntry.bundle//&platform=ios&dev=true&hot=false&lazy=true:311211:19)
    at RCTScrollContentView
    at RCTScrollView
    at ScrollView (http://<my_ip>:8081/node_modules/expo/AppEntry.bundle//&platform=ios&dev=true&hot=false&lazy=true:66218:36)
    at ScrollView
    at RCTView
    at View (http://<my_ip>:8081/node_modules/expo/AppEntry.bundle//&platform=ios&dev=true&hot=false&lazy=true:64061:43)
    at StyledNativeComponent (http://<my_ip>:8081/node_modules/expo/AppEntry.bundle//&platform=ios&dev=true&hot=false&lazy=true:308152:21)
    at Styled(View)
    at MaterialTabs (http://<my_ip>:8081/node_modules/expo/AppEntry.bundle//&platform=ios&dev=true&hot=false&lazy=true:302271:21)

If I comment out the MaterialTabs tag the warning disappears.
P.S I am using the MaterialTabs component inside a @gorhom/bottom-sheet component, just mentioning in case it is related.
Would love your help, thanks in advance :)

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