Last active
October 29, 2020 23:02
-
-
Save jhannes/3839d4e63e3e1c69b19ffe72095b1d92 to your computer and use it in GitHub Desktop.
Localization with TypeScript and React context
This file contains 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
export default function App() { | |
const [language, setLanguage] = useState(english); | |
return ( | |
<ApplicationTextsContext.Provider value={language}> | |
<div className="App"> | |
<MainPage /> | |
<SelectLanguage onChangeLanguage={setLanguage} /> | |
</div> | |
</ApplicationTextsContext.Provider> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment