Tracking issue for removing `react-motion` dependency
See original GitHub issueI’m getting the following console warning after upgrading to React 16.9.0
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: Motion, TransitionMotion
The above error is what I’m getting in my code, but I have recreated a similar warning in the console here: https://codesandbox.io/s/nivoline-line-layers-461-yogxd?fontsize=14
Only seems to happen to charts with custom tooltips - it doesn’t appear for piecharts, but does if I render a choropleth or a line chart
Not sure if Motion/TransitionMotion are dependencies or part of Nivo.
Maintainer Edit: This is due to the react-motion
package which is still used for some of the nivo packages, here is the list of packages still need to be migrated to react-spring
:
- Bar (#1619)
- Bullet (#1252)
- Chord (#1874)
- Circle Packing (#1360)
- Colors (#1885)
- Network (#1767)
- Scatterplot (#1726)
- Sunburst (#1264)
- Swarmplot (#1365)
- Waffle
Issue Analytics
- State:
- Created 4 years ago
- Reactions:44
- Comments:24 (6 by maintainers)
Top Results From Across the Web
react-motion - npm Package Health Analysis | Snyk
Learn more about react-motion: package health score, popularity, security, ... All security vulnerabilities belong to production dependencies of direct and ...
Read more >Error importing Framer Motion v5 in React (with create-react ...
I downgraded the Framer motion version to "4.1.17" by changing the package.json file and running npm install and it works for me.
Read more >Removing Effect Dependencies - React Docs
Follow this guide to review and remove unnecessary dependencies from your Effects. You will learn. How to fix infinite Effect dependency loops; What...
Read more >How to Remove Unused Dependencies in React - Pluralsight
These dependencies are reusable react components imported as npm packages. However, projects that have too many dependencies hinder performance ...
Read more >Developing responsive layouts with React Hooks
In order to solve this issue, we can keep track of width in React state and ... In old school React you would...
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 FreeTop 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
Top GitHub Comments
I agree. It is a big change we are planning to make. Up until about a month ago, it was a single person managing the project. Now, I have been given some access to help merge PRs and manage issues. This is the second biggest issue we need to tackle.
First, we are migrating the codebase to TS, which is in progress #821 and #963. After that is complete we will be tackling this.
There’s an PR to fix this in react-motion: chenglou/react-motion#534. The initial hesitation was about compatability with React v14/15. But now it sounds like the project is somewhat abandoned.
Other have mentioned successful transitions to react-spring: react-spring/react-spring.