Open sergei-maertens opened 10 months ago
I'll test it out with React 18 and update the dependencies.
To avoid loading the dependencies, you can subclass the JSONFormWidget
and override the media
method to remove those js file references which you don't need.
If you are going to include the underlying js library in your bundle, then you'll be responsible for rendering the widget yourself on relevant pages. You can find the complete guide in react-json-form
docs: https://bhch.github.io/react-json-form/docs/usage/node/.
I've published a new version of react-json-form on npm which supports React 18.
I see that the form field declares the
media
property which loads your react, react-dom and react-modal dependencies + the actual UI code.We happen to already use react & react-modal in our (admin) application, so it would be cool if we could avoid loading those dependencies multiple times.
Do you have any pointers or documentation on how we could include your UI code in our own bundle? We use webpack for bundling. I can see that https://github.com/bhch/react-json-form is published to npm, but it only lists React v17 in the peer dependencies. Are there known issues with React 18?