b-gran / object-editor-react

Schema-aware editor for structured JSON objects (drop-in React component)
https://b-gran.github.io/object-editor-react/githubExample.html
MIT License
123 stars 17 forks source link

Trying to use and edit src/example/github-example.js #74

Open cimerejb opened 2 years ago

cimerejb commented 2 years ago

I first create a default react project using npx create-react-app then I install the object-editor-react via npm then I copy the src directory (by downloading it from git), overwriting my src directory

WHen I try to run npm start, I get:

Failed to compile

src/util.js Line 54:25: React Hook "R.useWith" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooks

Search for the keywords to learn more about each error. "

It appears that the utils.js has a fundamental issue that violates this 'React Hook' principle. Since I am not an expert, I don't know yet how to go around this issue.

Any idea what I am doing wrong?