react-json-view icon indicating copy to clipboard operation
react-json-view copied to clipboard

Upgrade peer dependencies: React 18

Open OlivierMartineau opened this issue 2 years ago • 12 comments

Upgrade peer dependencies so that the package is compatible with React 18

OlivierMartineau avatar Apr 28 '22 14:04 OlivierMartineau

I need this upgrade, marge this PR please!

joiseimagemaker avatar May 29 '22 02:05 joiseimagemaker

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.

alenocera avatar Jun 01 '22 10:06 alenocera

@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.

HuanxinHu avatar Jun 01 '22 19:06 HuanxinHu

Bump

joshsten avatar Jun 02 '22 20:06 joshsten

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.

BlakeBeus avatar Jun 03 '22 17:06 BlakeBeus

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.

joshsten avatar Jun 04 '22 00:06 joshsten

npm solution is to add to your package.json:

  "overrides": {
    "react-json-view": {
      "react": "18.1.0",
      "react-dom": "18.1.0"
    }
  }

galkin avatar Jul 06 '22 13:07 galkin

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!

alenocera avatar Jul 06 '22 15:07 alenocera

try to use https://github.com/TexteaInc/json-viewer 1.24.4

himself65 avatar Sep 13 '22 20:09 himself65

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

galr52 avatar Oct 18 '22 13:10 galr52

@mac-s-g ping!

mattvb91 avatar Dec 02 '22 15:12 mattvb91

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 ;)

shaun3141 avatar Mar 05 '23 19:03 shaun3141