Closed salmanorak closed 7 months ago
@QuiiBz thansk for fix. When You are planing the release with fixes?
I'd like to merge https://github.com/QuiiBz/next-international/pull/316 that fixes another issue before landing a new release.
Hi! @QuiiBz Is there a date to expect the release of a new version including this fix? Thanks 👌
Sorry for the delay - https://github.com/QuiiBz/next-international/releases/tag/1.2.0 has been published!
Describe the bug The reference of t function that returns from useI18n and useScopedI18n is not stable.
To Reproduce reproduce:
Expected behavior The reference of the t function should be stable so it will not cause a re-calculate when it is used in any hook dependency array.
Screenshots after each re-render the useEffect that has only t function dependency is refiring.![image](https://github.com/QuiiBz/next-international/assets/41747037/cbd03b75-0f09-4a4a-ae4c-8cb86d97dac5)
About (please complete the following information):
Workaround
For know I have wrapped the function with one useState hook.