Created
December 2, 2016 09:29
-
-
Save prashaantt/ec60821aaa0bb7147455f1b499808655 to your computer and use it in GitHub Desktop.
This file contains 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
@inject("userStore") | |
@withRouter | |
@observer | |
class MyComponent extends React.Component<MyComponentProps, {}> { | |
get injected() { | |
return this.props as InjectedProps; | |
} | |
render() { | |
const { name, countryCode } = this.props; | |
const { userStore, router } = this.injected; | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment