mobxjs / mobx-react

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

observer doesn't re-render functional components #910

Closed xarety closed 3 years ago

xarety commented 3 years ago

Intended outcome

Functional component re-render after observable property change.

Actual outcome

Functional component doesn't react to observable property change.

How to reproduce the issue

https://codesandbox.io/s/mobx-react-7x-1qnp6?file=/src/App.tsx

mweststrate commented 3 years ago

Please follow the migration guide first: https://mobx.js.org/migrating-from-4-or-5.html

xarety commented 3 years ago

Thanks!