Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the react-i18next <Trans> component properly

In their examples on github, and in other places, react-i18next seem to suggest that we should use their Trans component by filling it with some kind of text, which to my understanding does not appear in the resulting app in any way since it gets overwritten by the default locale. What's it for? Is it just there to make sure react doesn't optimize away the components?

like image 582
Joel Nordström Avatar asked Oct 20 '25 17:10

Joel Nordström


1 Answers

An old question, but this fantastic resource here really helped me wrap my head around the <Trans /> component.

like image 148
Aleksi Avatar answered Oct 25 '25 07:10

Aleksi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!