Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement