Dynamically enable ssr during react-router build?
#14653
Unanswered
andrioidApacta
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
You can enabled SSR, and then in your code ensure you only do CSR using something like ClientOnly. This will still SSR a fallback UI when requesting a document but the actual UI will be CSR-ed. Also note that SPA navigations style is still going to happen with SSR enabled, the only difference with SSR enabled is that now instead of a single static HTML file you will send a HTML generated at the moment which can have content or it can be a fallback UI. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Hi everyone! I'm considering taking our SPA to SSR; but I still need to build both versions until we're ready.
The
ssr: falseoption is set in the configuration file. Is there any way to override that duringbuild; or build both?I'd really like to avoid patching the configuration file to achieve this. Is there a CLI option I missed?
Beta Was this translation helpful? Give feedback.
All reactions