redux-devtools
redux-devtools copied to clipboard
React-json-tree: Update UNSAFE_componentWillReceiveProps lifecycle hook.
I could not find any related issues, so please forgive me if this was already addressed somewhere.
React throws following warning when using react-json-tree
:
Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles 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
Please update the following components: JSONNestedNode, JSONTree
I believe I could fix this and update those components. Is this in your roadmap?
What version of react-json-tree
are you using? It should be fixed in [email protected]
by https://github.com/reduxjs/redux-devtools/pull/483.
I'm using version 0.13.0. The PR #483 just updates the deprecation messages using UNSAFE_componentWillReceiveProps
instead of implementing getDerivedStateFromProps
. I propose updating those comps with the new static method.
Oh, I see, sorry, I read the issue too fast. Yeah, it's worth fixing, so PRs are welcome. Eventually I will get to it myself, but it's not the highest priority right now.