How to use the set function from mobx

Find comprehensive JavaScript mobx.set code examples handpicked from public code repositorys.

16
17
18
19
20
21
22
23
24
    if (isBoxed) {
      observable.set(value)
    } else if (isPropObservable) {
      target[key] = value
    } else {
      mobx.set(observable, value)
    }
  } catch (error) { }
}
fork icon0
star icon1
watch icon0

+ 3 other calls in file

83
84
85
86
87
88
89
});
mobx_1.autorun(function () {
    console.log(mobx_1.get(twitterUrlsTest, "Sara")); // `get` can track not yet existing properties.
});
mobx_1.runInAction(function () {
    mobx_1.set(twitterUrlsTest, { Sara: "twitter.com/horsejs" });
});
fork icon0
star icon0
watch icon0