Getting waring in React 16.8.6 about ComponentWillRecieveProps
See original GitHub issueThe warinig is as follows:
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.
- Move data fetching code or side effects to componentDidUpdate.
- If you’re updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
- Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run
npx react-codemod rename-unsafe-lifecycles
in your project source folder.
Please update the following components: ReactSwipableView
Issue Analytics
- State:
- Created 4 years ago
- Reactions:75
- Comments:34 (4 by maintainers)
Top Results From Across the Web
get warning "componentWillReceiveProps has been renamed ...
This is a warning from react native. componentWillReceiveProps is a synchronous hook. Calling asynchronous function like data fetching ...
Read more >Legacy Context - React
The problem is, if a context value provided by component changes, descendants that use that value won't update if an intermediate parent returns...
Read more >react-dom | Yarn - Package Manager
React will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second...
Read more >Handle 'componentWillReceiveProps' deprecation warning
As part of the implementation of async rendering in React, there are a few lifecycle methods which wi... Tagged with javascript, react, ...
Read more >Returning null from setState in React 16 - LogRocket Blog
React 16 lets you decide whether state gets updated via .setState to prevent unnecessary DOM updates. Calling .setState with null no longer ...
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 Free
Top 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
Hi Guys,
it looks like it is still a open issue? Are there any plans to fix it?
Still facing problem