Skip to content

Instantly share code, notes, and snippets.

@eyaleizenberg
Created June 29, 2018 06:55
Show Gist options
  • Select an option

  • Save eyaleizenberg/08eabe77389172e0ca66101ffec4ebcb to your computer and use it in GitHub Desktop.

Select an option

Save eyaleizenberg/08eabe77389172e0ca66101ffec4ebcb to your computer and use it in GitHub Desktop.
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