1.0.1 • Published 6 years ago

react-translate-connector v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-translate-connector

NPM JavaScript Style Guide

Install

npm install --save react-translate-connector

Usage

import React, { Component } from 'react'

import connectProvider from 'react-translate-connector';


class Header extends React.Component {
render(){
    return(
      <div>	
       <button onClick={() => this.props.changeLang('en')}>EN</button>
       <button onClick={() => this.props.changeLang('es')}>ES</button>
      </div>
    )
  }
}

export default connectProvider(Header);

Props

NameTypeParamDescription
changeLangFunctionLanguage keyChange the current language
languageObjectvoidObject that contains the language keys

License

MIT © eugeni9872