How to use the action function from mobx
Find comprehensive JavaScript mobx.action code examples handpicked from public code repositorys.
61 62 63 64 65 66 67 68 69
//enqueueEvents([{ section: 'test', type: 'test.blah' }]) }) } } const processReceivedError = action(error => { console.error('processReceivedError', error) state.errorCount += 1 })
0
2
2
+ 13 other calls in file
219 220 221 222 223 224 225 226 227 228
], Router.prototype, "matched", null); tslib.__decorate([ mobx.computed ], Router.prototype, "matchReg", null); tslib.__decorate([ mobx.action ], Router.prototype, "onShow", null); tslib.__decorate([ mobx.action ], Router.prototype, "onShown", null);
0
2
1
+ 39 other calls in file
GitHub: Dellil/MobX-Practice
16 17 18 19 20 21 22 23 24 25 26
}, () => { console.log('react', state.compB); }); // 함수로 만들어서 나중에 실행 const change = action(() => { state.compA = 'c'; state.compB = 25; state.compC = 'c'; });
0
1
0
932 933 934 935 936 937 938 939 940 941
], Model.prototype, "__fileDeletions", void 0); __decorate([ mobx_1.observable ], Model.prototype, "__fileExists", void 0); __decorate([ mobx_1.action ], Model.prototype, "parse", null); __decorate([ mobx_1.computed ], Model.prototype, "backendValidationErrors", null);
0
0
0
+ 21 other calls in file
mobx.runInAction is the most popular function in mobx (1598 examples)