react-i18next NPM Package — withTranslation

John Au-Yeung
3 min readJan 9, 2021
Photo by Mohiuddin Farooqui on Unsplash

If we want to add localization to a React app, we can use the react-i18next NPM package to do it.

In this article, we’ll look at how to load translations with the withTranslation higher-order component.

withTranslation

The withTranslation higher-order component lets us wrap our component to let us gain access to the t function…

--

--