Created
February 5, 2018 15:45
-
-
Save JoaoCnh/82fe20a98f65c73d604fd9da2e695954 to your computer and use it in GitHub Desktop.
HOC usage
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
@withI18n | |
class MyComponent extends Component { | |
render() { | |
return <div>{this.props.locale}</div> | |
} | |
} | |
// or -- depending on your decorator usage | |
class MyComponent extends Component { | |
render() { | |
return <div>{this.props.locale}</div> | |
} | |
} | |
export default withI18n(MyComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment