-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Issues with react hooks #69
Comments
Can you share the code? It might be a couple of reasons. Follow the link that comes with the error to read more |
Here's the code, I'd read the page the error page linked but no dice as far as I can tell. App.js
Kick.js
NPM Installed packages
React version check
|
Can you try installing |
I cannot believe I just forgot a package. Sorry to waste time, looks like this all works now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Howdy all, I'm pretty new to both three.js and React itself but I've been running into an issue with this package that I think it an issue on the programs side so hear me out.
I've been trying to render .gltf/.glb files via Gltfjsx and react-three-fiber and figured I'd start off with a tutorial (https://www.youtube.com/watch?v=q7yH_ajINpA) that I'd try following verbatim. Initially I was running into an import error with drei but I resolved that thanks to #67 but I'm not out of the water. Now when calling the generated component I'm getting "Error: Invalid hook call. Hooks can only be called inside of the body of a function component." on render. The crash handler doesn't seem to be a fan of the line "const { nodes, materials } = useGLTF("/kick.glb");"
Does anyone have advice on this?
The text was updated successfully, but these errors were encountered: