Is it possible to tell if my function is running in a reactive context? #3862
Unanswered
tomasreimers
asked this question in
Q&A
Replies: 2 comments
-
You may find it useful: https://mobx.js.org/configuration.html#observablerequiresreaction-boolean |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
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
-
I'm building a library on-top of mobx. I want to throw an error if a specific function is called outside of a reactive context (specifically, I expect it to be called from within a react component and want to make sure the observer HOC wasn't forgotten).
Is that possible?
Beta Was this translation helpful? Give feedback.
All reactions