import { makeObservable, observable, action } from 'mobx';
import { observer } from 'mobx-react';
import React from 'react';

@observer class Index extends React.Component {
    @observable x: number = 0;

    constructor(props) {
        super(props);
    }

    @action
    clickMe() {
        this.x += 1;
    }

    render() {
        return (
            <button onClick={this.clickMe.bind(this)}>{this.x}</button>
        );
    }
}

export default Index;