medusajs / nextjs-starter-medusa

A performant frontend ecommerce starter template with Next.js 14 and Medusa.
https://next.medusajs.com/
MIT License
1.76k stars 489 forks source link

NextJS 13 SSR/ISR support #81

Closed hucancode closed 1 year ago

hucancode commented 1 year ago

With the release of NextJS 13, it is now more convenient to fetch store data from server using React Server Component. I tried migrating and managed to get part of products/[slug] rendered on the server. Haven't done the benchmark but in theory it should be faster 😄 I see that package medusa-react is stateful and supposed to be used in client. I wonder if I could skip medusa-react and only use medusa-js to fetch store data on the server. Is there anybody tried to do the same, can you share your experience?

amilcarrey commented 1 year ago

Any new on this?

bojkomatias commented 1 year ago

Would be great to have next 13 app dir storefront

smeubank commented 1 year ago

Easy start to just bump react 18 and next 13 https://github.com/medusajs/nextjs-starter-medusa/pull/76

AppDir and other specific aspects of NextJS13 come next

Would be great to have next 13 app dir storefront i am playing with medusa for testing with Sentry. We have been working on appdir support for our @sentry/nextjs SDK.

@bojkomatias out of curiosity what does app dir do for you that next 13 without appdir doesn't?