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.
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.