-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Fix typegen for routes with a client loader but no server loader #12117
Conversation
🦋 Changeset detectedLatest commit: e6b7aad The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
IsDefined<ClientLoaderData> extends true ? | ||
ClientLoaderHydrate extends true ? ClientLoaderData : | ||
ClientLoaderData | undefined | ||
: | ||
IsDefined<ClientLoaderData> extends true ? ClientLoaderData : |
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.
If a route has a client loader but no server loader, then clientLoader.hydrate
is implied and we will always call the loader before rendering the component, so no need for this fork here to include undefined
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.
Am I understanding this right that the absence of a loader
and the presence of a clientLoader
means that the route is automatically CSR only?
I don't think I ever realized that 😅
"⚠️ Paths with dynamic/splat params cannot be prerendered when using `prerender: true`.", | ||
"You may want to use the `prerender()` API to prerender the following paths:", | ||
...paramRoutes.map((p) => " - " + p), | ||
].join("\n") |
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.
oops - this was just a miss when this warning got added - I noticed doing some testing yesterday that it prints unnecessarily because paramRoutes is always defined and it also doesn't actually log the routes it's referring to 🤦♂️
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.
Tested locally, looks good to me!
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
No description provided.