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
^1.3.3
Yup, this one is annoying.
Also this will mean that this library won't work with React 17 which is out in the next few months supposedly.
It's a warning. The solution in this case is probably not to change to UNSAFE_componentWillReceiveProps (which will likely have real issues with concurrent mode due to all the side-effects), but to rewrite with getDerivedStateFromProps or useEffect. It's a pretty big task, probably worth looking into once we have more details about the concurrent mode APIs.
Any progress on this issue?
same warning for version ^1.4.0-beta.5
Is this issue what is stopping me from re-rendering the component with new html depending on what template I would like to select?
Nope, that would be something else.
Hi I am trying to use React-Quill with hooks and am running into this issue. Are there any timelines for getting this fixed?
thank you for the great work being done on maintaining this repo updated, I hope this gets fixed soon.
Running into this issue. Is there an ETA on this fix?
This is fixed with the v2 beta, which got rid of all the deprecated methods. Thanks for the report!
Most helpful comment
It's a warning. The solution in this case is probably not to change to
UNSAFE_componentWillReceiveProps(which will likely have real issues with concurrent mode due to all the side-effects), but to rewrite withgetDerivedStateFromPropsoruseEffect. It's a pretty big task, probably worth looking into once we have more details about the concurrent mode APIs.