Closed amannn closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-intl-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 12, 2024 0:21am |
next-intl-example-app-router | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 12, 2024 0:21am |
next-intl-example-app-router-without-i18n-routing | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 12, 2024 0:21am |
Fixes #215
Intl.*
constructors likeIntl.DateTimeFormat
are now cached across components in order to improve rendering performance (see benchmark).Details:
Intl.*
constructors..format
calls are currently not cached. The reason is that whileIntl.*
constructor caching can work across various component instances and formatting calls,.format
calls typically only affect a single call site. The overhead of memoization (serialization of args, diffing, bundle size) therefore might not be a good tradeoff here. In this area, avoiding re-renders is much more relevant, with the ideal solution being React Compiler.