Created
June 29, 2018 06:55
-
-
Save eyaleizenberg/08eabe77389172e0ca66101ffec4ebcb to your computer and use it in GitHub Desktop.
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
| interface IProps { | |
| superhero: string; | |
| } | |
| interface IState { | |
| health: number; | |
| } | |
| export class MyComponent extends React.PureComponent<IProps, IState> { | |
| readonly state = { health: 100 }; | |
| render() { | |
| return <span>{`${this.props.superhero} health is: ${this.state.health}`}</span> | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment