Usage with Nextjs 13 App Router
elton-okawa opened this issue ยท 5 comments
In Nextjs 13, App Router is stable released as the new approach to deal with routing. Here's some references:
- Nextjs 13.4 - App Router
- App Router Incremental Adoption Guide
- Official relay examples using Next 13
Current relay-nextjs
tutorial guide uses Page Router
approach. I would like to ask some early guidance:
- Is it still possible to use this library?
- What would change?
Thanks in advance!
Hey @elton-okawa! Supporting the new App Router is not on our radar at the moment. We feel that the App Router is not stable enough to really start building on top of it, and there is no urgent need to as server components don't provide meaningful improvements to applications all-in on Relay.
Is there any feature from the App Router that you would want to use with Relay?
Hi @rrdelaney thanks for the detailed response!
I see, at the moment I don't have any feature in mind.
Being honest, I just came across this library and wanted to try it out with Next.js, then I realized those differences.
May I open up a PR to add this info on Prerequisites
page? I think more people might stumble on the same question that I had.
@elton-okawa Great idea, would love to have something in the README and docs on this ๐
FWIW, nextjs-relay-streaming-ssr is a recent project that uses Next.js 14 App Router (and even React 18 streaming SSR).
Just a note that Relay docs now link to an official example of using SSR with app router (works with getStaticProps/getServerSideProps too). https://github.com/relayjs/relay-examples/tree/main/issue-tracker-next-v13