Internationalization In Next.js 13 With React Server Components

  • Home
  • Internationalization In Next.js 13 With React Server Components
Internationalization In Next.js 13 With React Server Components

Internationalization In Next.js 13 With React Server Components

Based on an example of a multilingual app that displays street photography images from Unsplash, Jan Amann explores next-intl to implement all internationalization needs in React Server Components and shares a technique for introducing interactivity with a minimalistic client-side footprint.With the introduction of Next.js 13 and the beta release of the App Router, React Server Components became publicly available. This new paradigm allows components that don’t require React’s interactive features, such as useState and useEffect, to remain server-side only. One area that benefits from this new capability is internationalization. Traditionally, internationalization requires a tradeoff in performance as loading translations results in larger client-side bundles and using message parsers impacts the client runtime performance of your app. The promise of React Server Components is that we can have our cake and eat it too. If internationalization is implemented entirely on the server side, we can achieve new levels of performance for our apps, leaving the client side for interactive features. But how can we work with this paradigm when we need interactively-controlled states that should be reflected in internationalized messages? In this article, we’ll explore a multilingual app that displays street photography images from Unsplash. We’ll use next-intl to implement all

Leave a comment

Your email address will not be published. Required fields are marked *

loader