import * as React from "react";
import { Component } from "react";
import logo from "./assets/react.svg";


export default class App extends Component {
	constructor(props) {
		super(props);
		this.increase = this.increase.bind(this);
		this.decrease = this.decrease.bind(this);
		this.state = {
			count: 0
		};
	}

	decrease() {
		this.setState({
			count: this.state.count - 1
		});
	}

	increase() {
		this.setState({
			count: this.state.count + 1
		});
	}

	render() {
		var { count } = this.state;
		return <>
			<h1>Hello React+Anu!</h1>
			<div>
				<img src={logo} alt="react" />
			</div>
			<div>
				<button type="button" onClick={this.decrease}>-</button>
				{count}
				<button type="button" onClick={this.increase}>+</button>
			</div>
		</>;
	}
}
