Skip to content

mobx-react-lite@5.0.1

Choose a tag to compare

@github-actions github-actions released this 19 Aug 14:07
· 5 commits to main since this release
f2db759

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.