react-json-view
react-json-view copied to clipboard
🔧 Fixing the demo build
The demo doesn't work.
If we run the npm run build:demo
command and if we open the resulting demo in the browser, we get a blank page with an error.
It doesn't work because:
- We had a bug in the demo component, we were trying to spread a null value.
- CDN links were referring to react 15, this version doesn't have
forwardRef
yet. It was introduced in React 16.3 - https://github.com/facebook/react/blob/main/CHANGELOG.md#react-17
In this PR I'm fixing the demo build.