Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React is null in @formio/react src/components #545

Closed
Amir-Pasha-Bagheri opened this issue Dec 2, 2023 · 2 comments
Closed

React is null in @formio/react src/components #545

Amir-Pasha-Bagheri opened this issue Dec 2, 2023 · 2 comments

Comments

@Amir-Pasha-Bagheri
Copy link

I am trying to add some changes to @formio/react , but when I run the project with my custom cloned @formio/react , the page crashes and I get these errors :

Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app

and :

Uncaught TypeError: Cannot read properties of null (reading 'useRef')

So I checked out my source code and I realized that the React in import React from 'react'; is null !
No auto complete also works when I type React.

File extension is .jsx

So I simply say that React is not recognized in my jsx files !

@brendanbond
Copy link
Contributor

React is going to be a peer dependency of the library, so I wonder if your dependencies are just not being installed here?

@lane-formio
Copy link
Contributor

Thank you for your contribution. As this issue has been inactive for over 90 days, I will close it for now. If you wish to reopen the issue, please respond, and we can resume the triage process.

@lane-formio lane-formio closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants