diff --git a/docs/pages/docs/design-principles.mdx b/docs/pages/docs/design-principles.mdx index 7dd0a351b..ba897d1a7 100644 --- a/docs/pages/docs/design-principles.mdx +++ b/docs/pages/docs/design-principles.mdx @@ -94,10 +94,10 @@ Next.js has a rich ecosystem of libraries that can be used alongside `next-intl` To achieve this, `next-intl` primarly relies on these techniques currently: -1. **Splitting of messages**: By splitting messages by locale, and optionally also by server, client and component, we can reduce the amount of messages that are sent to the client. This is especially important for apps that support many languages and have a large amount of messages. -2. **Shortcuts**: By detecting plain messages, these messages can be returned immediately without having to parse them first. -3. **Caching**: Parsing and formatting of messages is cached across your app, therefore reducing the amount of necessary computation. -4. **RSC-first**: By integrating deeply with React Server Components, we can offload work to a build step or a capable server, therefore reducing the runtime footprint of your app on the client side. +1. **RSC-first**: By integrating deeply with React Server Components, we can offload work to a build step or a capable server, therefore reducing the runtime footprint of your app on the client side. +2. **Splitting of messages**: By splitting messages by locale, and optionally also by server, client and component, we can reduce the amount of messages that are sent to the client. This is especially important for apps that support many languages and have a large amount of messages. +3. **Caching**: Parsing of messages, as well as the instantiation of [`Intl`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) constructors is cached across your app, therefore reducing the amount of necessary computation. +4. **Shortcuts**: By detecting plain messages, these messages can be returned immediately without having to parse them first. → [Planned enhancements](https://github.com/amannn/next-intl/labels/area%3A%20performance) @@ -105,7 +105,7 @@ To achieve this, `next-intl` primarly relies on these techniques currently: Next.js comes with a lot of bells and whistles, but at the same time there are a number of aspects that need to be handled carefully to enable a reliable internationalization integration. `next-intl`, as the name implies, is primarly designed to work well with Next.js. Rather than trying to be a one-size-fits-all solution, `next-intl` integrates with Next.js as deeply as necessary and makes it a priority to stay on top of the latest developments in the Next.js ecosystem. -That being said, `next-intl` has a Next.js-agnostic core that can be used in any React app, or even in plain JavaScript: [`use-intl`](/docs/environments/core-library). This core library contains most features of `next-intl`, but lacks Next.js-specific integrations like routing APIs. The goal of this library is to make it possibly to use familiar APIs in other parts of your stack (e.g. React Native) and to provide a straightforward way to [migrate away from Next.js](#migration-friendly), in case you ever decide to do so. +That being said, `next-intl` has a Next.js-agnostic core that can be used in any React app, or even in plain JavaScript: [`use-intl`](/docs/environments/core-library). This core library contains most features of `next-intl`, but lacks Next.js-specific integrations like routing APIs. The goal of this library is to make it possibly to use familiar APIs in other parts of your stack (e.g. React Native) and, in case you ever feel like Next.js is not the right fit for your project anymore, to provide a straightforward [migration path](#migration-friendly). ## Migration-friendly