Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid/extra warning in observable.box(array) #3835

Open
nukisman opened this issue Feb 20, 2024 · 0 comments
Open

Invalid/extra warning in observable.box(array) #3835

nukisman opened this issue Feb 20, 2024 · 0 comments
Labels

Comments

@nukisman
Copy link

nukisman commented Feb 20, 2024

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant