You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I did to fix it is to declare it before using it but i prefer doing it like I showed before const translation = T("translationKey") condition && <Component label={translation} />
The text was updated successfully, but these errors were encountered:
Hi, yes your solution is the right way to handle conditional rendering with hooks. Talkr only relies on Context, this is why you must comply to the rule of hooks. It could be fixed, but I'd need to use other packages and this would go against the idea of Talkr: having a super-light i18n solution with 0 dependencies.
It happens to me on a conditionally displayed translation for example, when the condition goes from false to true
condition && <Component label={T("translationKey")} />
What I did to fix it is to declare it before using it but i prefer doing it like I showed before
const translation = T("translationKey")
condition && <Component label={translation} />
The text was updated successfully, but these errors were encountered: