Skip to content

Instantly share code, notes, and snippets.

@arifkoken
Created July 20, 2017 08:59
Show Gist options
  • Save arifkoken/11a313a7111a74d73c64a56cd34eb095 to your computer and use it in GitHub Desktop.
Save arifkoken/11a313a7111a74d73c64a56cd34eb095 to your computer and use it in GitHub Desktop.
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