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.

Refactor componentWillReceiveProps in RevealBase

See original GitHub issue

React 16.9.0 warns of the impending deprecation of componentWillReceiveProps:

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: RevealBase

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:41
  • Comments:18

github_iconTop GitHub Comments

5reactions
colinhemphillcommented, May 28, 2020

Please don’t ping this thread unless you know of any maintained forks. This package has not been updated in 2 years and +1s won’t solve the issue. No merge for the fix is coming, so you should not be using this.

0reactions
MikaCinccommented, May 26, 2020

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactoring componentWillReceiveProps lifecycle method
I need to refactor componentWillReceiveProps lifecycle method as it is deprecated. getDerivedStateFromProps will not work because there are ...
Read more >
Refactor componentWillReceiveProps in RevealBase
Refactor componentWillReceiveProps in RevealBase.
Read more >
Refactor componentWillReceiveProps() to ...
In this lesson, we'll look at how to refactor an existing component that uses componentWillReceiveProps() to instead use getDerivedStateFromProps() and ...
Read more >
How to update data to a reactjs website? - #15 by Jen
If you're updating state whenever props change, refactor your code to ... react-dom.development.js:88 Warning: componentWillReceiveProps has ...
Read more >
React - Refactor ComponentWillReceiveProps with ... - YouTube
If you want to learn more about ReactJS, Mobx and React Router V4 you can check out my course I offer support and...
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