Replies: 1 comment 2 replies
-
Hi, the author of Am I right that your warnings are caused by |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to get a serializable representation of a store without triggering computations or reactions? Something suitable for logging to redux devtools.
mobx-log supports devtools, but if you have mobx strict mode enabled it triggers a ton of warnings. I wanted to make something that doesn't affect the state at all if possible.
I'd expect to see whatever is available, not the full state. If a computed has already computed, show the value, if not just
<not computed>
or something like that.Also I would only want to display whatever can be easily serialized to primitive values, or possibly nested objects and arrays containing primitive values. Functions and other things could just show a string
<function>
.In many cases it's possible to build a representation of the state just by using
spy
, and creating or updating objects with thedebugObjectName
and the diff (as long as the diff was limited to simple objects and primitives at least).I can also get at the value using
getAtom()
Mostly I got stuck with nested observables and maps.
is there anything existing that can do something like this?
Beta Was this translation helpful? Give feedback.
All reactions