Next.js/SSR example? #19
-
Hi, great job with the router! 👍 I've been following this project for some time but I never dedicated enough time to actually try it/use it. One thing that would help me a lot is a working Next.js example with SSR. Would you happen to have something like this? Next.js is a very popular SSR solution for React but it probably requires a custom server because Next.js has a different routing system by default. Or maybe some other SSR example independent of Next.js? Thanks! 😎 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@mrtnzlml thanks for your question. My first gut reaction is that Yarr really isn't a suitable replacement in Next.js. Since (as you are aware) Next.js ships it's own routing solution that is already SSR friendly. I'm not totally up-to-speed on Next.js current support for Suspense and suspenseful data but I'd have to imagine if this is something they don't already support that it would be on the roadmap given the React roadmap of features coming soon. As for SSR in general, we haven't testing Yarr with SSR yet. I suspect it would mostly work without issue, but I could see a couple possible hang-ups that could come up. This is something we can look into in the future, but as always, feel free to contribute a PR if you happen to get things working, or an issue if you run into problems getting Yarr to work in SSR. |
Beta Was this translation helpful? Give feedback.
@mrtnzlml thanks for your question.
My first gut reaction is that Yarr really isn't a suitable replacement in Next.js. Since (as you are aware) Next.js ships it's own routing solution that is already SSR friendly.
I'm not totally up-to-speed on Next.js current support for Suspense and suspenseful data but I'd have to imagine if this is something they don't already support that it would be on the roadmap given the React roadmap of features coming soon.
As for SSR in general, we haven't testing Yarr with SSR yet. I suspect it would mostly work without issue, but I could see a couple possible hang-ups that could come up.
This is something we can look into in the future, but as always, feel …