Open semnyqu opened 4 years ago
It's a bug. You need change the code as the following.
export default class TabNavigator extends React.Component { static propTypes = { ...ViewPropTypes, sceneStyle: ViewPropTypes.style, tabBarStyle: ViewPropTypes.style, tabBarShadowStyle: TabBar.propTypes.shadowStyle, hidesTabTouch: PropTypes.bool };
ViewPropTypes
ViewPropTypes is undefined
I'm just deleting this code tabBarStyle: TabBar.propTypes.style
in TabNavigator.js . It's the fastest method to solve the error.
大佬们这个问题怎么搞呀
上面有了解决文案了。。删了它
Why not fix the bug
import TabNavigator from 'react-native-tab-navigator';
render() { return ( <TabNavigator tabBarStyle={{height: 49}}> {......} ); }
Error: Warning: Failed prop type: TabNavigator: prop type
tabBarStyle
is invalid; it must be a function, usually from theprop-types
package, but receivedundefined
.