Replies: 3 comments 3 replies
-
|
Typically this error happens when a component is called directly as a function (which isn't a valid way to invoke a component): function Foo(props) {
const [x] = useState()
return <span>{x}</span>
}
Foo() |
Beta Was this translation helpful? Give feedback.
-
|
Maybe this will help someone: I was adding a shadcn component into an app in an NX monorepo with root shared |
Beta Was this translation helpful? Give feedback.
-
|
For folks using Vite and encountering this issue the solution is to dedupe in vite.config: resolve: {
dedupe: ["preact", "preact/hooks", "preact/jsx-runtime"],
}, |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
I keeo getting this error when trying to use hooks in child components. I used the preact-cli to build a simple scaffold. Not sure why this is happening. I see this discussion but i am not using anr url imports only the basic preact-cli v10.7.3
Beta Was this translation helpful? Give feedback.
All reactions