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

Updates for the new REACT?

Open alex-newray opened this issue 9 years ago • 9 comments

Will there be an update for the new REACT 15?

alex-newray avatar Apr 27 '16 14:04 alex-newray

Hi Alex,

It's been a while that I don't use react-json in my dialy work. I suppose that the errors comes from the CSS and the absence of the inner tags.

Do you dare to make a PR to make it work again?

Cheers, Javi

arqex avatar Apr 27 '16 14:04 arqex

I made a quick fork and fixed a few things. There were a few errors related to findDomNode() being deprecated as of react v15.

Unfortunately, I am not familiar with this library back when 0.13 was still floating around, so I am not sure if I have full functionality restored. As for tests, it's not clear to me on how to run those as no documentation/setup instructions are included :-)

@alex-newray @arqex Could you check out this fork and see what's missing?

One thing I noticed is that the css does not get loaded automagically, but perhaps that is by design. Since I'm using Webpack for the project I am using this in, this is not a biggie as it's easily solved with a quick css-loader.

hilkeheremans avatar May 10 '16 13:05 hilkeheremans

@hilkeheremans Yes, it works. Only need to change depending on new react @arqex @hilkeheremans I would like to see the updated version in npm Thank you

alex-newray avatar May 15 '16 12:05 alex-newray

@hilkeheremans can you make a PR for your changes? It looks like they are working.

mwq27 avatar Oct 02 '16 16:10 mwq27

https://github.com/arqex/react-json/pull/8

hilkeheremans avatar Oct 02 '16 19:10 hilkeheremans

Thanks @hilkeheremans .

Have you tried this component while using Redux? I can't get the onChange event to fire when I'm using redux.

mwq27 avatar Oct 02 '16 20:10 mwq27

Nice to see movement in this repo. The project where I use react-json is not in react 15, that's why this issue was a bit forgotten.

I'll try to merge @hilkeheremans PR this evening ;)

Thanks

arqex avatar Oct 03 '16 08:10 arqex

Merged thanks.

I have a question. How do you use this library? I created it in the early days of react because handling deep changes in deep trees of data was so challenging, and what's a better example than a JSON editor for that?

After that, I created freezer.js to manage those changes, and redux became very famous, and I started using react-json as a quick way of creating forms and editing generic data, but all that logic about extending/collapsing nodes is not useful to me any longer.

I think this library could be revamped to work really well as a form editor, but I don't know if there is people who likes its json editor features, or if there will be devs interested in another (but the simplest) form generator.

arqex avatar Oct 03 '16 15:10 arqex

I vote for providing only the form generator functionality. That has been very useful but I have not found any use case for the JSON editor.

searler avatar Nov 16 '16 23:11 searler