Skip to content

Instantly share code, notes, and snippets.

@ryandrewjohnson
Last active April 16, 2018 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryandrewjohnson/f2bfb6bc787966da014338d9e9eacb76 to your computer and use it in GitHub Desktop.
Save ryandrewjohnson/f2bfb6bc787966da014338d9e9eacb76 to your computer and use it in GitHub Desktop.
import React from 'react';
import { LocalizeContext } from './LocalizeContext';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
activeLanguage: 'en',
languages: ['en', 'fr', 'es']
}
}
return (
<LocalizeContext.Provider value={this.state}>
{this.props.children}
</LocalizeContext.Provider>
)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment