Closed RosenTomov closed 5 years ago
@pavelserbajlo make sure HMR is disabled and that there is only one instance of mobx and mobx-react in your module tree. I've seen both HMR, and improperly organized dependencies as primary usecases for random weird behavior in the past. (if that doesn't help, please take the conversation to a separate issue as indicated by @FredyC, this one is closed now)
Fixed in 6.1.0
Just wanted to say Thank You for the pragmatic fix. After I had to go back to v4 due to this issue, I've bumped the version back to latest 6.1.0 and everything seems to work like expected. Now my team can adopt hooks iteratively without a hurry or any further migrations. 👏
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.
Like title says, componentDidUpdate() won't trigger since mobx-react version 6.
For example, I want to keep the scroll position to the bottom:
Trying with reaction, doesn't really solve the issue, since it doesn't wait for the element to render and it will scroll to the second to last element instead.
I've also tried going back to a React.Component, just to be sure, but no luck. I don't know if I'm missing something.
Thanks.