Created
July 20, 2017 08:59
-
-
Save arifkoken/11a313a7111a74d73c64a56cd34eb095 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 App extends Component | |
{ | |
constructor(props) | |
{ | |
super(props); | |
this.state = { deger: 0 } | |
this.arttirFunction = this.arttirFunction.bind(this) | |
}; | |
arttirFunction() | |
{ | |
this.setState({ deger: this.state.deger + 1 }) | |
} | |
render() | |
{ | |
return ( | |
<div> | |
<button onClick={this.arttirFunction}>Arttir</button> | |
<h3>Deger : {this.state.deger}</h3> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment