Created
July 9, 2019 10:44
-
-
Save adamkleingit/24776081e3519e6b0da78862761d2877 to your computer and use it in GitHub Desktop.
Using ReusableLoclization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useCurrentLocale, LocaleSwitcher} from 'reusable-locale'; | |
const Comp1 = () => { | |
const currentLocale = useCurrentLocale(); // Using a global store from external lib | |
} | |
const Comp2 = () => { | |
return <LocaleSwitcher/>; // External components using the same global store | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment