Hi everyone.
I'm trying to use Animated.View in Tabs renderTabBar param and getting this error

and this is my code

"react-native": "0.63.2"
"native-base": "^2.13.8"
Everything is working on "react-native": "0.61.5"
Hi @iqorlobanov , can you provide minimal code reproduction on snack for the same?
I also experience this.
This is rendered perfectly okay
<Tabs
renderTabBar={props => (props && <ScrollableTab />)}
>
<Tab heading="Tab 1">
<View>
<Text>Tab 1</Text>
</View>
</Tab>
<Tab heading="Tab 2">
<View>
<Text>Tab 2</Text>
</View>
</Tab>
</Tabs>
I found out that if you're using a root view inside renderTabBar, you'll get some error.
Also, by passing {...props} to ScrollableTab is causing the error if you're using <Animated.View>.
example:
<Tabs
renderTabBar={props => (props &&
<Animated.View>
<ScrollableTab { ...props } />
</Animated.View>
)
}
>
<Tab heading="Tab 1">
<View>
<Text>Tab 1</Text>
</View>
</Tab>
<Tab heading="Tab 2">
<View>
<Text>Tab 2</Text>
</View>
</Tab>
</Tabs>
@iqorlobanov
I was facing the same issue with Animated.View
I wrapped it in <> </> and it fixed the issue for me.

@iqorlobanov
I was facing the same issue with Animated.View
I wrapped it in
<> </>and it fixed the issue for me.
Thanks! It works :)
Most helpful comment
@iqorlobanov
I was facing the same issue with Animated.View
I wrapped it in
<> </>and it fixed the issue for me.