Last active
November 13, 2019 04:18
-
-
Save Giagnus64/684f66d12f7fa4a5e4ecfdd21175d5a7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import React, { Component } from 'react'; | |
| class Counter extends Component{ | |
| state={ | |
| balance: 0 | |
| } | |
| //const withdraw10 = () => {...} | |
| //const deposit10 = () => {...} | |
| render(){ | |
| return( | |
| <div> | |
| <button onClick={this.deposit10}>Deposit $10</button> | |
| <button onClick={this.withdraw10}>Withdraw $10</button> | |
| <p>Balance:{this.state.balance}</p> | |
| </div> | |
| ) | |
| } | |
| } | |
| export default Counter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment