Last active
July 1, 2018 00:54
-
-
Save ryandrewjohnson/342634672c36cb1cb7253deb7c2ab86e to your computer and use it in GitHub Desktop.
react-localize-redux - addTranslations.js
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 React from "react"; | |
| import { withLocalize } from "react-localize-redux"; | |
| import movieTranslations from "./translations/movies.json"; | |
| class Movies extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.props.addTranslation(movieTranslations); | |
| } | |
| render() { | |
| // render movie component | |
| } | |
| } | |
| export default withLocalize(Movies); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment