mobx
mobx copied to clipboard
Invalid/extra warning in observable.box(array)
configure({
observableRequiresReaction: true,
});
observable.box(1); // ok
observable.box(() => 1); // ok
observable.box({ a: 1 }); // ok
observable.box([1]); // [mobx] Observable 'ObservableValue@4' being read outside a reactive context.
Intended outcome:
No extra warnings
Actual outcome:
Extra warning with array in new created the box
How to reproduce the issue:
Reproducible in nodejs and in browser
Versions
- mobx: 6.12.0
- node: v20.10.0
- Chrome: 121.0.6167.184, (x86_64)