nivo
nivo copied to clipboard
Tracking issue for removing `recompose` dependency
Updating React now leads to a deprecation warning in the console:
react.development.js:315 Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
printWarning @ react.development.js:315
warn @ react.development.js:278
createFactoryWithValidation @ react.development.js:1827
(anonymous) @ shouldUpdate.js:18
pure @ pure.js:22
(anonymous) @ compose.js:13
enhance @ nivo-voronoi.esm.js:82
./node_modules/@nivo/voronoi/dist/nivo-voronoi.esm.js @ nivo-voronoi.esm.js:170
This is due to the recompose
package which is still used for some of the nivo packages, we have to migrate the following packages to React hooks (providing the same features) to get rid of it:
- [ ] Core
- [x] Pie
- [x] Voronoi (#1364)
- [ ] Waffle
- [x] Bullet (#1252)
- [x] Bar (#1619)
- [x] Circle Packing (#1360)
- [x] Sunburst (#1264)
- [x] Calendar
- [x] Legends (Listed in package.json, but not used)
Im getting same warning
Getting the same issue, How to remove the error
Same issue :(
Same here :(
Same...
This isn't a direct problem with the nivo packages, but instead of with one of its dependencies: recompose.
Specifically recompose/shouldUpdate
: https://github.com/acdlite/recompose/blob/master/src/packages/recompose/shouldUpdate.js#L6
and recompose/withPropsOnChange
: https://github.com/acdlite/recompose/blob/master/src/packages/recompose/withPropsOnChange.js#L9
Unfortunately, the recompose package appears to be mostly unmaintained. It's recommended to replace this package with some hooks.
Reading recompose readme, it suggest you use React Hooks instead
Same
There is a PR fixing this issue at recompose repository waiting to be merged for over a month https://github.com/acdlite/recompose/pull/795
Any updates on this? It's still showing in version 0.61.1
It's still showing to me too. Warning: React.createFactory() is deprecated. I am still waiting for a solution.
The solution from our end is to move away from recompose as a dependency. Which some charts already are using hooks instead. There are still a bunch of charts using this method, so it will take some time to get them all converted.
If anyone is interested in converting one, please don't hesitate to open a PR. Here is an example of a commit where this was done: https://github.com/plouc/nivo/commit/51a58c114b22961dcca6dfe9e52494c8336e0f22
Can someone make a list of the components that need a move away from recompose?
Packages list moved to main description.
recompose
now also has a dos security flaw being flagged with its deep dependency on node-fetch
.
https://github.com/plouc/nivo/issues/1129
I am willing to help contribute getting some of the list that @wyze mentions above converted over to a hooks-based implementation... but I do not want to invest that time if we have no chance of getting that work merged/published. The last published NPM release for Nivo was in 2017.
@plouc if we get this work done to where we can drop the recompose
dependency, will we be able to get a new package published?
Yes, I am aware that we could declare the dependency in package.json
as the forked and updated repo... I would rather not do that, and I do not want to be responsible for anyone who ends up pointing to that fork.
@brianespinosa while I agree I haven't been really reactive lately due to personal constrains, the latest release is from 4 months ago, I guess you referring to the old nivo
package VS the scoped ones @nivo/x
.
I understand that it can be quite frustrating to contribute on projects and to get no feedback or release including your work (I've experienced it too), and I really apologize for this.
I'll try to release something as soon as I can, but I prefer to not give a date, as each time I did, I had other priorities and could not release.
Unfortunately, forking would not work, you cannot point to repo packages directly as they have to be compiled, and the generated artifacts are ignored, also, as you mentioned, this approach has drawbacks and I would definitely not recommend doing this even if that was feasible.
@brianespinosa, I'm currently working on the state of CSS/JS surveys and I usually spend some time on nivo too as they use a lot of dataviz, so this should happen soon enough.
Thanks @plouc
In this case, I am going to let some of my team know that we can target some of these charts for refactoring. I can report back in about a week with where some of my team want to focus their efforts so we can coordinate.
Now removed from @nivo/pie
.
I'm getting this in 0.67.0
and I'm using @nivo/core
and @nivo/line
. My package-lock.json
states that recompose
is used by @nivo/core
.
I am also getting in 0.67.0. I am getting this as security vulnerability for @nvivo/bar.
Please note that until this list is fully completed, you're going to get those warnings, we're aware and working on it!
@wyze took care of the @nivo/sunburst
package.
@nivo/circle-packing
has been migrated (pending PR)
@nivo/voronoi
has been migrated (pending PR)
Just to let you know guys, I got this warning in @nivo/heatmap "^0.67.0"
, I'm using responsive canvas.
ty in advance.
Any news on @nivo/bar
? I'm still having the warning in "@nivo/bar": "^0.66.0"
Just bumping, looks like this is happening in core
which is still showing in this issue as not refactored yet.
console.warn
Warning: React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
...
...
at enhance (node_modules/@nivo/voronoi/src/enhance.js:19:5)
Hi, I'm getting this warning using only @nivo/core
and @nivo/line
but I don't see either of them in the list, are they planned for refactoring as well? Sorry if I missed something in this discussion but I would like to be sure.
I saw that @plouc expanded the initial issue I reported, but like @cfecherolle I'm only using @nivo/core
and @nivo/line
also, so I believe they (or one of them) should be included in the list too?