Replies: 1 comment
-
You can pass only a subset of required messages to the client side as explained in the docs. There is arguably a maintenance argument here if you have more complex client-side component trees. I've written down the current thoughts in #2 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I use nextjs13 with app dir. All application uses messages on server side and just pass it as props into client-childs when needed.
It works okay, but when message contains, for example, plural form, we can't do the same. So we have number of views which is changed dynamically on client with websockets so we don't know number of views on server side.
So now we should pass all messages to client side and use clientside hook which takes this message, applies number of views to it to get correct line like 1 view, 2 views, ...
So because of this one usecase we should pass all messages into intl context. Maybe there is a way to pass this plural template string to client and use client hook only on this message?
Mandatory reproduction URL (CodeSandbox or GitHub repository)
Reproduction description
Expected behaviour
Beta Was this translation helpful? Give feedback.
All reactions