-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose serializable useFormats
#981
Comments
Can you elaborate on what the use case is? Is the issue that On a side note, the alternative is exporting your Would be curious to learn more about your use case! |
Correct, that As for the app, it is a password manager of sorts, so very client centric since we do not have access to the data rendered. (Maybe we could do more server rendering, but not sure I've completely wrapped my head around how that would work so skipping for now) We are also exporting ( |
Thanks for including some context! Since this behavior might be changed in the future and formats would be automatically available on the client side, I think I wouldn't introduce a new API at this point—also given that a reasonable alternative is available. I hope you can understand! Once something is public API, we have to maintain it or carefully deprecate it once necessary and I think in this case it's currently not worth it. Sorry for pushing a bit back here, I really appreciate that you immediately went ahead and have set up a PR! |
All good, if I don’t submit a PR I don’t learn as much…
But I’ll ask, do you think I’m opting in to the Provider too quickly?
…On Mon, Apr 8, 2024 at 10:54 PM Jan Amann ***@***.***> wrote:
Thanks for including some context! Since this behavior might be changed in
the future and formats would be automatically available on the client side,
I think I wouldn't introduce a new API at this point—also given that a
reasonable alternative is available. I hope you can understand!
Once something is public API, we have to maintain it or carefully
deprecate it once necessary and I think in this case it's currently not
worth it. Sorry for pushing a bit back here, I really appreciate that you
immediately went ahead and have set up a PR!
—
Reply to this email directly, view it on GitHub
<#981 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOMNKDH7B4Y5TNLCX5F4FLY4N7AZAVCNFSM6AAAAABFZRLRJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBUGE4TSMBRGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It depends a bit on your app. For some apps more on the "website" end of the spectrum, you can get very far with Server Components, while for more interactive experiences, usage of the provider is necessary. I'm planning to improve the capabilities of If this goes well, it should feel less like a "am I doing the right thing" when stepping to the client side, but something that is naturally supported without tradeoffs. Hope this helps! I'll close this issue since the original issue seems to be have been answered. |
Is your feature request related to a problem? Please describe.
When using the
NextIntlClientProvider
there is current no way (that I saw) to access the formats in the same you are able to access the the "messages". The only available option isuseFormatter
which returns a function. However if you are trying to useNextIntlClientProvider
you cannot serialize the function and pass it to the provider.Describe the solution you'd like
In addition to
useFormatter
it would be great if there was a parallel touseMessages
, such asuseFormats
, which returns a serializable form of the formts.Describe alternatives you've considered
I don't think there are any alternatives
The text was updated successfully, but these errors were encountered: