RevereCRE / relay-nextjs

⚡️ Relay integration for Next.js apps
https://reverecre.github.io/relay-nextjs/
MIT License
251 stars 30 forks source link

Usage with Nextjs 13 App Router #89

Closed elton-okawa closed 1 year ago

elton-okawa commented 1 year ago

In Nextjs 13, App Router is stable released as the new approach to deal with routing. Here's some references:

Current relay-nextjs tutorial guide uses Page Router approach. I would like to ask some early guidance:

Thanks in advance!

rrdelaney commented 1 year ago

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?

elton-okawa commented 1 year ago

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.

rrdelaney commented 1 year ago

@elton-okawa Great idea, would love to have something in the README and docs on this 😄

redbar0n commented 6 months ago

FWIW, nextjs-relay-streaming-ssr is a recent project that uses Next.js 14 App Router (and even React 18 streaming SSR).

petrbela commented 5 months ago

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