github mobxjs/mobx mobx-react-lite@5.0.1

3 hours ago

Patch Changes

  • 043850ed96266f8bea42bf643a65e62245a98b3c #4689 Thanks @gesposito! - fix: useObserver no longer retains the element tree returned by a component's first render for the component's whole mounted life. subscribe/getSnapshot were created inside useObserver's first invocation and therefore shared that invocation's closure context with the reaction.track callback's captures (render, renderResult); since React's useSyncExternalStore holds subscribe while the component is mounted, the first render result (and every fiber and DOM node reachable from it) could never be garbage collected. The administration object is now created by a module-level factory whose scope contains nothing render-related.

Don't miss a new mobx release

NewReleases is sending notifications on new releases.