question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning about using componentWillReceiveProps

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Reactions:23
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
zenoamarocommented, Mar 29, 2020

This is fixed with the v2 beta, which got rid of all the deprecated methods. Thanks for the report!

6reactions
fahadahmedcommented, Nov 6, 2019

Hi I am trying to use React-Quill with hooks and am running into this issue. Are there any timelines for getting this fixed?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found