-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: prerender/ssr:false #13005
docs: prerender/ssr:false #13005
Conversation
|
docs/how-to/pre-rendering.md
Outdated
Pre-rendering allows you to speed up page loads for static content by rendering pages at build time instead of either: | ||
|
||
In some cases, you'll serve these pages _alongside_ a runtime SSR server. If you wish to pre-render pages and deploy them _without_ a runtime SSR server, please see the [Pre-rendering with `ssr:false`](#pre-rendering-without-a-runtime-ssr-server) section below. | ||
- on a server at request time (`ssr:true`) | ||
- client-side after hydration (`ssr:false`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely don't have to go with this, it just seemed like the original intro mentioned the runtime SSR server twice and only had a link to one option. I figure just giving the two options might help frame the whole guide a little better
docs/how-to/spa.md
Outdated
```tsx filename=root.tsx lines=[3,7,10] | ||
export async function loader() { | ||
return { | ||
version: await getVersion(), | ||
}; | ||
} | ||
|
||
export function HydrateFallback({ loaderData }) { | ||
return ( | ||
<div> | ||
<h1>Loading version {loaderData.version}...</h1> | ||
<AwesomeSpinner /> | ||
</div> | ||
); | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced this is necessarily, but wanted to see what you thought
@@ -29,7 +30,7 @@ export default { | |||
prerender: ["/", "/blog", "/blog/popular-post"], | |||
|
|||
// async function for dependencies like a CMS | |||
async pre-render({ getStaticPaths }) { | |||
async prerender({ getStaticPaths }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stupid find/replace!
…d-route-typegen * upstream/dev: bump patch to minor for new API: `href` Type-safe href (remix-run#12994) docs: prerender/ssr:false (remix-run#13005) Skip action-only resource routes with prerender:true (remix-run#13004) Update docs for spa/prerendering Improvements to ssr:false + prerender scenarios (remix-run#12948)
For the pre-rendering doc, what do you think about making the h2's
ssr: true
ssr: false
I'm just thinking those titles might be a bit more explicit/easier for people to immediately recognize the difference, though maybe that's only true if you're already familiar with
ssr: true | false