Closed ethanyou725 closed 6 years ago
All reactions in mobx are synchronized, so you need to wrap your async mutation into runInAction
method:
setTimeout(() => {
runInAction(() => this.data = [{ age: 18, name: 'aaa' }, { age: 19, name: 'bbb' }])
}, 1500);
check the doc: https://mobx.js.org/best/actions.html
It's my fault, sorry, closed.
here is the code, models
vue component:
Uncaught Error: [mobx] Since strict-mode is enabled, chang... The mobx strict mode is useful to prevent some unnecessary problem. I tried add action in vue compoent, it doesn't work, has any way to enable strict model ?