Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6208

Typescript: tabBarOptions from createBottomTabNavigator

$
0
0

I was building a react-native app via expo init via its 3rd option, which creates basic navigation template in Javascript. And recently I was trying out the Typescript with the existing template and try to convert those js code into typescript but cannot figure out why typescript raise errors on tabBarOptions.

The below is the partial code with slightly modifications from original(official) that has nothing to do with the type error. The code itself is perfectly runnable and the pattern appears in many SO questions about how to use tabBarOptions in createBottomTabNavigator correctly.

enter image description hereenter image description here

This is the typescript error. enter image description here

I also see the issue from github that layouts the component relationship.

https://github.com/react-navigation/tabs/issues/174

As far as I understand based on the link, the error shall not appear. I'm new to typescript so please don't judge me if I misunderstand any concept.


Viewing all articles
Browse latest Browse all 6208

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>