SSR with `query`
I'm trying to use
@solidjs/router's query like this:
and I have ssr: true in my app config.
If I disable JS and make a request in a route like this:
it doesn't SSR the page (in fact the page remains white with no errors neither on the client nor on the server).
Is query supposed to be called on the server or how can I SSR async server-only queries?3 Replies
Default SSR behaviour is streaming which requires JS to be enabled - you can disable this globally by setting
mode: "async" in entry-server, or set deferStream: true on the createAsyncCoolio, thank you very much 🙏
I can't seem to find any documentation about this. Are there downsides to using
async vs stream?With
stream you can opt-in via deferStream, but with async you can't go back to streaming
Just depends what behaviour you want