How to use the Reaction function from mobx

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

164
165
166
167
168
169
170
171
172
173
}
var wantedForceUpdateHook = options.useForceUpdate || useForceUpdate;
var forceUpdate = wantedForceUpdateHook();
var reaction = React.useRef(null);
if (!reaction.current) {
    reaction.current = new mobx.Reaction("observer(" + baseComponentName + ")", function () {
        forceUpdate();
    });
}
var dispose = function () {
fork icon0
star icon0
watch icon0

+ 4 other calls in file