Skip to content

Question: Making use-intl compatible with React Server Components across frameworks #1857

@ushiboy

Description

@ushiboy

Is your feature request related to a problem? Please describe.

Currently, use-intl only supports Client Components. On the other hand, next-intl includes optimizations for the Next.js environment and uses use-intl when running in Client Components, while relying on its own extended implementation for RSC (React Server Components).

This makes it difficult for other frameworks, such as Waku or @lazarv/react-server, to use use-intl with RSC.

Describe the solution you'd like

Would it be feasible to restructure the responsibilities so that next-intl focuses solely on Next.js-specific optimizations, and migrate its RSC implementation into use-intl?

With this change, next-intl would serve as a thin integration layer for Next.js, while use-intl would become a framework-agnostic internationalization library for React, supporting both Client Components and RSC across different environments.

Describe alternatives you've considered

An alternative could be to keep the current structure and implement the necessary server-side logic separately for each framework. While this is certainly possible, it might lead to some duplication of effort and make maintenance a bit more challenging in the long run.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions