Replies: 3 comments 3 replies
-
|
I was recently developing an Until then, I have to fallback to SSR. Interestingly enough, that turned out to be a way more complex endeavor than I anticipated. Primarily because image libraries are implemented in native code, and my target architecture doesn't match my Mac development machine. It became even more complicated due to a serverless deployment target. Took me a few days to figure that out, which could have been much simpler with pre-rendering 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
The If what you want is a way to mark a route to be pre-rendered from inside the route module, then it should be a new export like But also, take into account that what your prerender are pages/URLs, not routes, a URL like
So a route may say "I'm 100% prerenderable" but then a parent or nested route may not be. |
Beta Was this translation helpful? Give feedback.
-
|
I'm trying to do a static site and with sitemap. I want similar functionality. After some exploration I found something interesting: What I'm trying to say is, instead of injecting information to I'm still try to understand how React Router parse out the information from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the
prerenderfunction in react router config only provides agetStaticPathsmethod to obtain the urls without dynamic segment.It would be interesting if it provided the complete list of routes including additional data (such as the
handle). This way it would be more practical to implement additional static generation patterns through route information. For example, I could create a route withor
and access it inside the
prerenderfunction.Beta Was this translation helpful? Give feedback.
All reactions