Skip to content

A way to use MobX observable in React useEffect #3547

Answered by urugator
Luminqi asked this question in Q&A
Discussion options

You must be logged in to vote

If it is observable, that means its reference will not change, so changes are tracked by MobX.

How so? If I read it correctly, the observable isn't accessed inside tracking context (render/computed/effect), therefore not tracked.

Related:
#3224
#3348
#3252

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Luminqi
Comment options

Answer selected by Luminqi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants