Just getting started with Mobx & React and having trouble getting the store to update. I get error when clicking the button, which should update the \'me\' property:
<
I don't know mobx
but onClick={store.change_me}
is a problem because you are using a method on a class as a function (without this
). You will have to use use something like:
onClick={event => store.changeMe(event)}
otherwise the binding to store
is lost.
Also possible but less readable:
onClick={store.changeMe.bind(store)}