Skip to content

observable.shallow doesn't react in reaction. #2929

Answered by mweststrate
ygnoh asked this question in Q&A
Discussion options

You must be logged in to vote

b.as is a reference that doesn't change, so there is no reason to react here. You are probably looking for () => b.as.length (for example). Make sure to grok https://mobx.js.org/understanding-reactivity.html

Replies: 1 comment 1 reply

Comment options

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

Answer selected by ygnoh
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