Last active
January 26, 2018 10:41
-
-
Save rajat1saxena/487e8b0054d061b08ad85681ca5d81ce 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
class Counter extends React.Component { | |
constructor() { | |
super(); | |
// define the internal state of the component | |
this.state = {name: 'rajat'} | |
} | |
render() { | |
return ( | |
<div> | |
{this.state.name} | |
</div> | |
); | |
} | |
} | |
// Usage: | |
// In your react app: <Counter /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment