Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillMount() {
this.props.dispatch(setLanguage('es'))
}
<button> dispatch(setLanguage("fr"))}>Français</button>}
<button> dispatch(setLanguage("es"))}>Español</button>}
onChangeLang = (e) => {
this.props.dispatch(setLanguage(e.target.value))
}
componentWillMount() {
this.props.dispatch(setLanguage('en'))
}
<button> dispatch(setLanguage("en"))}>English</button>}
getRemoteTranslations() {
this.props.dispatch(setTranslations({
'es': {
'Hello world!': 'Hola Mundo!'
}
}))
}