Key takeaways from Next.js Conf 2022

Next.js Conf 2022 brought a lot of new things with Next.js version 13. Let's have a look at what is new.
  • New compilation tool – Turbopack. Set out to replace webpack as the main compiler in the future, try it with next dev --turbo.
  • New file-based routing system for complex UI » a lot of new file name conventions. Can be incrementally adopted by using an "app" folder. Routes in the "app" folder take precedence over the "pages" folder. There is a lot of new naming conventions to learn and follow. More features to come for this new route system.
  • Next.JS now has a library for self-hosting fonts (even directly from Google Fonts) `import { Inter } from '@next/font/google'`
  • New API route and library for dynamically generating Social Media Cards (see @vercel/og repo)
  • Middleware is maturing and could be easily set up for feature flags and/or A/B testing (see the talk A/B testing: performative experimentation at scale on stage J)
  • Server-side streaming is now here! Next.JS 13 requires React v18
  • Pages and components are now server-side components by default. If you want a client-side component paste in the following on top of the file 'use client'.
  • New documentation site https://beta.nextjs.org/docs