I'm reading the docs of mobx-react-lite and confusing with the difference between observer hoc and useObserver hook. According to the docs, observer hoc will trigger re-render twice while useObserver won't:
One good thing about this is that if any hook changes an observable for some reason then the component won't rerender twice unnecessarily. (example pending)
I'm not so familiar with mobx-react-lite, but interested in what causes that differences. Here is the docs: https://mobx-react.js.org/observer-hook