[RC] ssr: false causes renderToPipeableStream error
I get this error with a simple component in a simple route. If I remove ssr prop it renders normally.
7 Replies
eastern-cyanOP•2w ago
Versions used:
I just noticed it works if I navigate to the page through Link after initial render. But get the error If I refresh the page or access this route directly
robust-apricot•2w ago
can you please create a github issue for this including a complete minimal reproducer project?
eastern-cyanOP•5d ago
Turns out it was the defaultPedingComponent. We were using a custom skeleton that relied on huge client only code. It was easy to miss because it was working with router alone.
It might be a good idea to include a note in the docs stating that those defaultComponents are rendered on the server only
robust-apricot•5d ago
not true, they are isomorphic as any other component
eastern-cyanOP•5d ago
I see. So any component can have client code on it? What if calls a localStorage inside the useState init function?
In any case, I decided just to throw the legacy component away, but I will investigate it further later. Maybe some conditional inside of it was returning an non serializable thing
robust-apricot•5d ago
it would fail. so wrap that in a ClientOnly component
or disable SSR for that route
eastern-cyanOP•5d ago
Gotcha. Thanks