Open sagihsh opened 1 year ago
same here
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:
previous: "translateX: props.value" --> translateX: props.value.interpolate(...)
const Indicator = (props: IndicatorProps) => (
<Bar
color={props.color}
style={{ transform: [{
translateX: props.value.interpolate({
inputRange: [0, 1],
outputRange: [0, 1],
}),
}]}}
tabWidth={props.tabWidth}
height={props.height}
/>
);
Hey @programminPete do you mind sending a PR to include this?
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 :)