-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is autorun doesn't run when observable props has changed? #546
Comments
From a cursory glance I'm not sure exactly what the issue is, but that seems a bit antipattern for react, which may be making things harder for you. I'd rather have a new component for each event and location rather than reusing the same one. I'd set up an event store and a location store, separate from your react code. You can still fetch events and locations on demand, but you won't have to refetch if the same event or location comes up again. Personally, I'd keep the autorun in a store and not the react component. The docs actually have a really good example that includes a reaction, which is like an autorun. |
I don't think that @observable event = {}; into this: @observable event = {
location: null
}; Also I don't think you ever change |
@leesiongchan, I see that your |
@leesiongchan, feel free to reopen |
Provided I have a code like below, why is
this.props.event.location
wouldn't be triggered when changed?The text was updated successfully, but these errors were encountered: