Skip to content

Instantly share code, notes, and snippets.

@adamkleingit
Created July 9, 2019 10:44
Show Gist options
  • Save adamkleingit/24776081e3519e6b0da78862761d2877 to your computer and use it in GitHub Desktop.
Save adamkleingit/24776081e3519e6b0da78862761d2877 to your computer and use it in GitHub Desktop.
Using ReusableLoclization
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