redux-code
redux-code copied to clipboard
Update LanguageContext.js
State also contains the updater function so it will be passed down into the context provider.
This is the React Team recommended way. Please see React Docs / Context / Examples / Updating Context from a Nested Component / app.js