Replies: 1 comment
-
|
There's no such thing as client components in RR. Adding If you only want to prevent rendering but the component being imported server-side is ok, you need to skip the render, what you did works, but will cause hydration errors, a better solution is to use something like ClientOnly, you can check the code of that repo and copy the implementation as it's quite simple. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm putting an interactive P5 canvas component in my React Router 7 (framework mode) app using the
@p5-wrapper/reactpackage. It's kind of a paint/doodling app, and I fully expected SSR to choke on it (which it happily does).What I don't get is how to tell the server not to render this component. I tried naming the file
footerfx.client.tsx, and that got nowhere. I also tried React's built inlazycomponent import, and<Suspense>to initialize upon load. Also didn't work.Ultimately the only thing that worked is adding this to
footerfx.tsx:What am I missing here? If naming a file
.clientdoesn't specifically tell the SSR engine to not render the component, what is that even for?Beta Was this translation helpful? Give feedback.
All reactions