-
Notifications
You must be signed in to change notification settings - Fork 1
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
i18n
function is not referentially stable
#2
Comments
Do you have an example of an effect where you would want to use |
I had a |
I agree it should be possible. While thinking about it I wondered of a use case where you would need |
That is what actually was the case, and I fixed it by doing exactly that. We could also just note the fact that it isn't referentially stable in the docs. |
I actually think it should be referentially more stable. So I would vote to add a That said, we should probably use it as a potential red flag when we see it used inside another hook during reviews. |
useI18n()
returns a different function each time it's called. This makes it hard to use the i18n function inside auseEffect
.The text was updated successfully, but these errors were encountered: