How to use the when function from mobx
Find comprehensive JavaScript mobx.when code examples handpicked from public code repositorys.
GitHub: mobxjs/mobx-utils
9 10 11 12 13 14 15 16 17 18
const obs = utils.fromPromise(p) expect(obs.value).toBe(undefined) expect(obs.state).toBe("pending") mobx.when( () => { return obs.state === "fulfilled" }, () => {
119
0
0
+ 44 other calls in file
mobx.runInAction is the most popular function in mobx (1598 examples)