import React from 'react'
import DevTools from 'mobx-react-devtools'
import { observable } from 'mobx'
import { observer } from 'mobx-react'
@observer
class App extends React.Component {
@observable count = 0
inc = () => {
this.count++
}
dec = () => {
this.count--
}
render() {
return (
<div>
<h1>{this.count}</h1>
<button onClick={() => this.inc()}>+</button>
<button onClick={() => this.dec()}>-</button>
<DevTools />
</div>
)
}
}
export default App
...using rewire mobx.. It seems to work. If I click the last icon, I get:

The undefined looks a bit worrisome, but then I click the middle icon and I get this:

What am I messing up? I'm following the Mobx course on Egghead. It's probably a bit dated.
...using rewire mobx.. It seems to work. If I click the last icon, I get:
The
undefinedlooks a bit worrisome, but then I click the middle icon and I get this:What am I messing up? I'm following the Mobx course on Egghead. It's probably a bit dated.