- Install yarn
npx install yarn@2
as this repo makes use ofyarn workspaces
- run
yarn set version berry
- run
yarn config set nodeLinker node-modules
- run
yarn install
- run
yarn components:build
- run
yarn start
- in the browser that opened see that the
MyComponent
app is using the translation key not the value. - update
package.json
and change thereact-i18next
version to12.0.0
and run steps 5 & 6. Notice now the text is showing the value.
Since the release of 12.0.1
of react-i18n
imported components from external packages no longer can use the i18n
instance defined in the application doing the importing. If you change the version back to 12.0.0
it works flawlessly. I believe the removal of the React.useContext(I18nContext)
in react-i18next.js
line #744 is the culprit.