mobx icon indicating copy to clipboard operation
mobx copied to clipboard

Invalid/extra warning in observable.box(array)

Open nukisman opened this issue 1 year ago • 0 comments

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)

nukisman avatar Feb 20 '24 15:02 nukisman