How to use the runInAction function from mobx
Find comprehensive JavaScript mobx.runInAction code examples handpicked from public code repositorys.
53 54 55 56 57 58 59 60 61 62
.then(action(() => { state.successCount += 1 })) } else { runInAction(() => { state.successCount += 1 //enqueueEvents([{ section: 'test', type: 'test.blah' }]) })
0
2
2
+ 13 other calls in file
281 282 283 284 285 286 287 288 289 290
function useAsObservableSourceInternal(current, usedByLocalStore) { if (usedByLocalStore && current === undefined) { return undefined; } var _a = __read(React__default.useState(function () { return mobx.observable(current, {}, { deep: false }); }), 1), res = _a[0]; mobx.runInAction(function () { Object.assign(res, current); }); return res; }
0
0
0
+ 9 other calls in file
mobx.runInAction is the most popular function in mobx (1598 examples)