mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 349 forks source link

Mobx not working with next.js properly #776

Closed ksydex closed 5 years ago

ksydex commented 5 years ago

It just doesn't rerender component on state change. Tried everything, nothing works, while using pure React everything works fine. Any advices? Is there new(2019) examples for next.js + mobx integration ?

danielkcz commented 5 years ago

Possible duplicate of https://github.com/mobxjs/mobx-react-lite/issues/71, but it was never properly resolved. If you are keeping your state in global variables, it might be a problem due to concurrency of Next, but otherwise without a reproduction hard to say what's wrong in your case.

ksydex commented 5 years ago

@FredyC Thanks for answer. I did get it work by getting decorator syntax in my project. Idk how it actually helps, but it works now, and im happy !)

lock[bot] commented 4 years ago

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.