React Three Fiber v9.8.2

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: setDpr is overwritten by the dpr prop whenever the Canvas rerenders. If you want to use setDpr then don't use the dpr prop. This behavior will change in v10.
  • TypeScript JSX types fixed, preventing React.ElementType props from collapsing to never. 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.
What's Changed
New Contributors

Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v9.8.1...v9.8.2

View original

Upgraded? How did it go?

Discussion