Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Failed prop type: TabNavigator: prop type tabBarStyle is invalid; #200

Open
semnyqu opened this issue Apr 26, 2020 · 6 comments
Open

Comments

@semnyqu
Copy link

semnyqu commented Apr 26, 2020

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 the prop-types package, but received undefined.

@307499815
Copy link

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
};

@Yonina11-code
Copy link

ViewPropTypes

ViewPropTypes is undefined

@BadtzMaru
Copy link

I'm just deleting this code tabBarStyle: TabBar.propTypes.style in TabNavigator.js . It's the fastest method to solve the error.

@ProCheng
Copy link

ProCheng commented Feb 7, 2021

大佬们这个问题怎么搞呀

@hopetomorrow2019
Copy link

上面有了解决文案了。。删了它

@situyuchai
Copy link

Why not fix the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants