v9.8.2
Changed 2
- Pixel ratio now updates automatically when moving between displays or zooming
- The dpr prop overwrites setDpr whenever the Canvas rerenders; use one or the other, as this behavior will change in v10
Fixed 7
- Portal memory leak fixed so a portal's root state is no longer retained by the parent after unmounting, allowing garbage collection
- TypeScript JSX types no longer collapse React.ElementType props to never, and importing R3F no longer breaks unrelated React types
- Dragging stays active when an object's args change
- Removed objects disappear immediately with frameloop="demand" instead of lingering as ghosts
- Pointer capture is kept across instance reconstruction
- Only three constructors are registered as intrinsic elements in the types
- Canvas follows devicePixelRatio changes
From React Three Fiber
We have another set of bug fixes, some backported from v10. Here are the highlights:
- Portal memory leaks have been fixed. The portal's root state would get held by the parent even when the portal got unmounted disallowing garbage collection. You mount and unmount on a complex enough app and this adds up quickly. A portal can now be cleaned up properly when unmounted.
- Pixel ratio updates automatically when moving between displays or zooming. Note:
setDpris overwritten by thedprprop whenever theCanvasrerenders. If you want to usesetDprthen don't use thedprprop. This behavior will change in v10. - TypeScript JSX types fixed, preventing
React.ElementTypeprops from collapsing tonever. Importing R3F no longer breaks unrelated React types. - Dragging stays active when an object’s
argschange. - Removed objects disappear immediately with
frameloop="demand"instead of lingering as ghosts.
What's Changed
- ci(docs): publish the v10 alpha docs under /next with a version switcher by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3971
- ci: remove the canary workflow from master (canary is v10-only) by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3986
- fix(events): keep pointer capture across instance reconstruction by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/3985
- docs: use three addons loader imports in hooks examples by @pavan-sh in https://github.com/pmndrs/react-three-fiber/pull/3746
- docs: add sparkjs, threepipe, react-three-map, wawa-vfx, r3f-globe, Three-VFX to community components grid by @jo-chemla in https://github.com/pmndrs/react-three-fiber/pull/3714
- fix(docs): remove outdated koestlich README link by @alex-marinov in https://github.com/pmndrs/react-three-fiber/pull/3767
- docs(tutorials): add STL loading to the Loading Models guide by @BenMalaga in https://github.com/pmndrs/react-three-fiber/pull/3787
- fix(core): request a frame when an object is removed with frameloop="demand" by @xaviergonz in https://github.com/pmndrs/react-three-fiber/pull/3976
- fix(types): only register three constructors as intrinsic elements by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/4002
- fix(core): follow devicePixelRatio changes by @tonyblu331 in https://github.com/pmndrs/react-three-fiber/pull/3959
- docs: add Codesandbox preview images by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4004
- refactor(fiber): clarify v9 core domain boundaries by @krispya in https://github.com/pmndrs/react-three-fiber/pull/4008
- docs: use the built-in version switcher of @pmndrs/docs 4 by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4005
- docs: adopt the default pmndrs palette of @pmndrs/docs 4.20 by @abernier in https://github.com/pmndrs/react-three-fiber/pull/4011
- chore: add a pull request template by @DennisSmolek in https://github.com/pmndrs/react-three-fiber/pull/4019
- docs: fix two dead links in testing and basic animations pages by @SatvikMishra08 in https://github.com/pmndrs/react-three-fiber/pull/4024
- fix(fiber): port the Portal leak fixes from v10 by @wrangelvid in https://github.com/pmndrs/react-three-fiber/pull/4030
New Contributors
- @alex-marinov made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3767
- @BenMalaga made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3787
- @xaviergonz made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/3976
- @SatvikMishra08 made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/4024
- @wrangelvid made their first contribution in https://github.com/pmndrs/react-three-fiber/pull/4030
Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.8.1...v9.8.2