react-json-view
react-json-view copied to clipboard
Upgrade peer dependencies: React 18
Upgrade peer dependencies so that the package is compatible with React 18
I need this upgrade, marge this PR please!
Come on guys, please do this simple merge :) Im joking but it's important for all the people that kinda continue to use this nice repo and fixes the deps is so useful. Thanks, help is appreciate.
@mac-s-g At your connivence, would you please take some time to review this MR, your package is used by thousands of developers. Thanks.
Bump
This pull request doesn't actually make this React18 ready. It's going to be quite a bit more work.
The unit tests are handled by Enzyme. Which isn't compatible with React 18 and looks to be abandoned.
Additionally, RJV relies on Flux, which is in maintenance mode and won't be receiving any more updates from Facebook, and isn't React 18 compatible.
If we want to have a chance of getting RJV React 18 ready we'll have to remove or replace those dependencies. I just don't have the time to do it at the moment. But someone is going to have to put in the work for an actual pull request that makes this React 18 ready.
While that's almost certainly true, It does make it usable, without regression. At-least for our purposes installing with npm install react-json-view --legacy-peer-deps functionally runs fine. It's just really obnoxious to deal with having to redo that every time we update everything else.
npm solution is to add to your package.json:
"overrides": {
"react-json-view": {
"react": "18.1.0",
"react-dom": "18.1.0"
}
}
npm solution is to add to your package.json:
"overrides": { "react-json-view": { "react": "18.1.0", "react-dom": "18.1.0" } }
Hi galkin, yes it works and it's not necessary run
npm -i --legacy-peer-deps
so at the moment I guess this is the best solution (my 2 cents). Thanks a lot!
try to use https://github.com/TexteaInc/json-viewer 1.24.4
hey i have created a fork because this repo is not active, you can open your or there https://github.com/galr52/react-extreme-json-view
@mac-s-g ping!
Just in case anyone is still seeing this and was about to let out a frustrated sigh because they still had an error - make sure you do still update the react
version in the overrides to the actual version you are using, it may not be 18.1.0
anymore ;)