-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.JS 13 #289
Comments
this is possible today without n13 right? what do you think about implementing all this in parts, starting with that? |
I think so. We can do it in parallel! |
Hey, what about we use the new https://nextjs.org/blog/next-13#data-fetching, one flexible way to fetch, cache, and revalidate data at the component level, along with middleware to generate tailored components/pages for each user? |
Hi, thanks for update, any update on Nextjs13 'app' folder? |
This is an RFC for migration to Next.JS 13 with the goal of drastically improving performance and overall ergonomics by using Server Components and Layouts.
TLDR
After this RFC:
Performance
Currently, our PSI performance is haunted by a huge TBT. This is because how React hydration works. Hopefully, Next.JS 13 and React 18 help solving this issue by the introduction of React Server Components (RSC).
With RSC, I hope to remove all components from the frontend except:
With that said, we will have to rethink the
ProductShelf
. To makeProductShelf
be able to render on the server, I propose the creation of a new cookie calledfs_segment
. This cookie will carry region/sales-channel/locale info and will be treated by amiddleware.ts
function, choosing which page to render for each user, making it possible to render shelfs on the server side.CMS Integration and Routing
One of the issues we currently have is that the
[...slug].tsx
file maps on-to-one with categories on the VTEX platform. This is bad because, sometimes, the user wants to create and declare a new page on theCMS
, like institutional page etc. To solve this issue, I propose using conditional routes so plps get detached from CMS pages.The text was updated successfully, but these errors were encountered: