You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not exactly a bug, but there seems to be no clear answer on the Discord server, so I will ask here. I am using the sycamore-rocket-template project, and am trying to re-create the todo demo in it. Since it uses SSR, it complains that the Location object used for saving/loading todo lists is only available on wasm targets.
How can this be worked around? What is the recommended way of solving this, when doing SSR and using wasm-only functions? Is there a way to only use SSR for certain routes?
The text was updated successfully, but these errors were encountered:
What this does is basically check if the type of G (the rendering backend) is the browser DOM (DomNode), thereby executing the branch only when in the browser.
You can put your browser only code in there (such as accessing Location).
Once #274 is merged, this will be a bit clearer with:
ifG::IS_BROWSER{ ...}
Please feel free to reopen if this doesn't answer your question.
This is not exactly a bug, but there seems to be no clear answer on the Discord server, so I will ask here. I am using the sycamore-rocket-template project, and am trying to re-create the todo demo in it. Since it uses SSR, it complains that the Location object used for saving/loading todo lists is only available on wasm targets.
How can this be worked around? What is the recommended way of solving this, when doing SSR and using wasm-only functions? Is there a way to only use SSR for certain routes?
The text was updated successfully, but these errors were encountered: