You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
The text was updated successfully, but these errors were encountered:
sagihsh
changed the title
Warning from react-native-animated about using shared value
Warning from react-native-reanimated about using shared value
Jul 27, 2023
Just fyi @sagihsh, @LucasTrombim, I was getting warning as well, so was thinking of moving away, but ended up being a pretty easy patch to the package. (If you're ok to use npm patch-package and just patch the package)
If you go to their Indicator.tsx component (node_modules/react-native-material-tabs/src/components/Indicator.tsx) you just need to update the "transform: translateX" to be an interpolate on the value instead of the value itself:
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:
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 :)
The text was updated successfully, but these errors were encountered: