this.state example in react
Example: state in react
class BalanceInquiry extends Component {
constructor(props) {
super(props);
this.state = {
totalIncome: 0,
};
}
render() {
return <div>totalIncome {this.state.totalIncome}</div>;
}
}