Warning:componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead.
Please update the following components:TabNavigator
$ npm info react-native-tab-navigator
react-native-tab-navigator@0.3.4 | MIT | deps: 2 | versions: 24
Warning:componentWillReceiveProps is deprecated and will be removed in the next major version. Use static getDerivedStateFromProps instead. Please update the following components:TabNavigator
$ npm info react-native-tab-navigator react-native-tab-navigator@0.3.4 | MIT | deps: 2 | versions: 24
""" import TabNavigator from "react-native-tab-navigator"; ... render () { return (
createItem(selectedTab, icon, selectedIcon, Component) { return ( <TabNavigator.Item title = {selectedTab} renderIcon = {() =>}
selected = {this.state.selectedTab === selectedTab}
onPress = {() => this.setState({selectedTab:selectedTab})}
""" { "name": "Demo", "version": "0.0.1", "private": true, "scripts": { "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "16.8.6", "react-native": "0.60.4", "react-native-tab-navigator": "^0.3.4", "react-navigation": "^3.11.1" }, "devDependencies": { "@babel/core": "^7.5.5", "@babel/runtime": "^7.5.5", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.8.0", "eslint": "^6.1.0", "jest": "^24.8.0", "metro-react-native-babel-preset": "^0.55.0", "react-test-renderer": "16.8.6" }, "jest": { "preset": "react-native" } }
"""