Components function warning every time
See original GitHub issueCreated a new react native project and install NativeBase, and call the components from native-base such Container, Text.
There are many warning message display in yellowbox, all related with “componentWillMount”,“componentWillUpdate”,“componentWillReceiveProps” in nativebase components. Warning message will alert in every time when I open those page relate with nativebase. Warning message as below:
_Warning: componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount.
Please update the following components: Container, DrawerLayout, DrawerView, Image, Text, TouchableOpacity, Transitioner, View, withCachedChildNavigation(DrawerScreen), withCachedChildNavigation(DrawerSidebar)
Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks_
My react version info as below:
"native-base": "^2.3.9",
"react": "^16.3.0-alpha.1",
"react-native": "0.54.0",
"react-native-elements": "^1.0.0-beta2",
"react-native-vector-icons": "^4.5.0",
"react-navigation": "^1.4.0"
Thank You.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Each child in a list should have a unique "key" prop - Stack ...
Warning: Each child in a list should have a unique "key" prop. Check the render method of `MyComponent`. in React. The error message...
Read more >Understanding the React exhaustive-deps linting warning
When you move from using class components to functional components ... logged in the useEffect every two seconds remains 0 the entire time....
Read more >Fixing exhaustive-deps warning in some common use cases
Dependency loops Every time we update the prop value, the component should add the new prop value to the existing summation of prop...
Read more >Fix the "not wrapped in act(...)" warning - Kent C. Dodds
There are a few reasons you're getting this warning. Here's how you fix it.
Read more >Fix the "Function makes the dependencies of useEffect Hook ...
Every time count changes, we want to run an effect that logs the count ... The logCount function is recreated on each component...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NativeBase 2.4.1 works fine with React 16.3.1 and React-Native 0.55.0
No fixes needed from NativeBase side. The reason because React 16.3.0-alpha.1 announced just the warning messages for deprecated lifecycle methods and not introduced its replacements.
React 16.3.1 introduced new aliases for these unsafe lifecycles namely,
UNSAFE_componentWillMount
,UNSAFE_componentWillReceiveProps
andUNSAFE_componentWillUpdate
.https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html
Very soon NativeBase will implement the new static lifecycle methods Stay tuned!
@mnlbox About?