Replies: 1 comment 1 reply
-
I think the easiest way is to set up a reaction that listens to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an observable map
peopleMap
which is a map indexed by person ids and contain as values person (id, name, email) objects. There are specific reactions for every property of a person in the map, I mean a change inperson.name
trigger a different reaction that a change onperson.email
. I implemented the reactions for a new person added in our map in the following way:with this code when I execute
this.peopleMap.set(1, newPerson)
, I get correctly the specific reactions for every property of thisnewPerson
, the idea is get this reactions automatically just after add a new person.The questions are as intercept is described as an antipattern in mobx official documentation
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions