onedrive-vercel-index icon indicating copy to clipboard operation
onedrive-vercel-index copied to clipboard

Upgrading to Next.js 13

Open spencerwooo opened this issue 2 years ago • 3 comments

  • [x] Upgrade deps to Next.js 13
  • [ ] Adapt new app directory and layout
  • [ ] Rewrite of data rendering (also data fetching with React server components)
  • [ ] Rewrite of Loading and Error layout
  • [ ] ...

spencerwooo avatar Oct 28 '22 11:10 spencerwooo

Using app directory and layout could help improving page loading significantly, since it can allow dynamicly load large libs like plyr, pdfjs, etc based on specific path. Currently we have to load everything since the website can't know the content for certain path ahead of time.

Would you be interested in accepting PR regarding app directory refactoring, or collabrate on such refactoring in the future? I think the fetch API refactoring on API route is the first step towards this goal, since the new data fetching system for server components is built on top of the native fetch() Web API.

aidenlx avatar Feb 19 '23 15:02 aidenlx

one potential objective: app/route in favor of pages/api (available in nextjs 13.1.7, currently in canary)

Note route handler implement an isomorphic API to support both Edge and Node.js runtimes so functions like ResponseCompat and NodeRequsetToWeb is no longer required.

aidenlx avatar Feb 20 '23 02:02 aidenlx

Would you be interested in accepting PR regarding app directory refactoring, or collaborate on such refactoring in the future?

@aidenlx Certainly, but I don't think I can spare too much time on this project in the foreseeable future. If you are interested, go for it.

spencerwooo avatar Feb 20 '23 09:02 spencerwooo