Skip to content
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

Merged
merged 5 commits into from
Feb 12, 2025
Merged

docs: prerender/ssr:false #13005

merged 5 commits into from
Feb 12, 2025

Conversation

brookslybrand
Copy link
Contributor

@brookslybrand brookslybrand commented Feb 11, 2025

For the pre-rendering doc, what do you think about making the h2's

  • Pre-rendering with ssr: true
  • Pre-rendering with 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

Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: ecab77b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 7 to 10
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`)
Copy link
Contributor Author

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

Comment on lines 51 to 66
```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>
);
}
```
Copy link
Contributor Author

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 }) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stupid find/replace!

@brophdawg11 brophdawg11 merged commit f54a09d into dev Feb 12, 2025
1 check passed
@brophdawg11 brophdawg11 deleted the brooks/prerender-docs branch February 12, 2025 16:10
wilcoxmd added a commit to wilcoxmd/react-router that referenced this pull request Feb 13, 2025
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants