You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-dom@16.8.6:373 Uncaught (in promise) Invariant Violation: 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:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
import * as React from "react";
import * as ReactDOM from "react-dom";
import { UseStateSample } from "./components/UseStateSample";
import { Route, Switch } from "fuse-react"
ReactDOM.render(
,
document.getElementById("root")
);
The text was updated successfully, but these errors were encountered:
It started when I failed to use react router in my project because of strange error about failing to load prop-types. I then switched to fuse-react as a router. But then this error happened when I tried to use hooks. I ended up fixing all this by upgrading fro, fuse-box 3.7 to 4.0 to solve the prop-types problem and then using react router to solve the hooks problem. So I am good (except for several hours wasted) just wanted you to know...I love fuse-box!
@ost12666 good to know!!! btw v4 is coming to open test soon. There will be breaking changes, I will update all the issues, and notify everyone to help test the new product ;-)
Getting this error:
react-dom@16.8.6:373 Uncaught (in promise) Invariant Violation: 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:
Used this example: https://github.com/konbu310/hooks-and-fusebox
And modified index.tsx to:
import * as React from "react";
import * as ReactDOM from "react-dom";
import { UseStateSample } from "./components/UseStateSample";
import { Route, Switch } from "fuse-react"
ReactDOM.render(
The text was updated successfully, but these errors were encountered: