Warning about using componentWillReceiveProps
See original GitHub issueDescription
I have storyshots set up with react-quill
for testing. When I run my tests, I get the following warning, since react-quill
uses componentWillReceiveProps
is being deprecated
● Console
console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
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-d
erived-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 depr
ecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: Quill
console.warn node_modules/react-dom/cjs/react-dom.development.js:11494
Warning: componentWillUpdate 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.
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifec
ycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.
Please update the following components: Quill
I took a look through the code, and it looks like it’s used here
React-Quill version
^1.3.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Handle 'componentWillReceiveProps' deprecation warning
One solution is to use the static getDerivedStateFromProps method. There is a great 'HowTo' dev.to Post from Larry Price.
Read more >componentWillReceiveProps warning - Questions - Babylon.js
*Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles ...
Read more >Suppressing legacy lifecycle method warnings in tests for ...
Warning : componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles ...
Read more >Warning: componentWillMount has been Renamed, and is not ...
componentWillMount; componentWillReceiveProps; componentWillUpdate. If you want to use these methods, prefix the methods with UNSAFE_ .
Read more >componentWillReceiveProps has been renamed - React Studio
backend.js:6 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for ...
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
This is fixed with the v2 beta, which got rid of all the deprecated methods. Thanks for the report!
Hi I am trying to use React-Quill with hooks and am running into this issue. Are there any timelines for getting this fixed?