Replies: 1 comment
-
|
After playing around a bit, it seems that pulling the "root" computed out into a simple standalone function solves the issue (demoed in v2 branch). Still curious about what is causing the issue for the original. Debugger touching stack/closures inappropriately and triggering a computation? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I'm not sure if this is a bug in mobx, in my code, or something else, so posting here to hopefully get some guidance
The repro: https://github.com/schmellow/mobx-debugger-cycle
This somewhat contrived example mimics the bigger application, which is a huge form, dynamically composed of different of sections. Each section is backed by its own store. The composite state of all sections is pulled up on change (with a delay) and persisted remotely.
Now normally everything works just fine. But if you put a debugger breakpoint (and here i'm using chrome debugger with vscode run & debug configuration), into FooState.state computed/getter, hit that breakpoint (just press a button on the page) and then continue and go out of the getter, mobx will tell you:
The whole computed chain is broken after that, until app reload.
Breakpoints inside actions cause no issues.
Have anybody encountered something like this? Can something be done, apart not breaking inside computed-related stacks ever?
Beta Was this translation helpful? Give feedback.
All reactions