Closed
Description
Intended outcome:
reaction will be triggered
import { autorun, runInAction, observable, reaction } from "mobx";
runInAction(() => {
const s = observable({ foo: 1 }, undefined, { deep: false });
reaction(
() => s.foo,
(val) => {
console.log("reaction: ", val);
}
);
autorun(() => {
console.log("autorun: ", s.foo);
});
runInAction(() => {
s.foo = 2;
});
});
Actual outcome:
When the reaction is placed in the runInAction function, the side effect function will not be triggered
How to reproduce the issue:
See console output: codesandbox
Versions
mobx-6.1.7