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 #3971
- ci: remove the canary workflow from master (canary is v10-only) by @DennisSmolek in #3986
- fix(events): keep pointer capture across instance reconstruction by @DennisSmolek in #3985
- docs: use three addons loader imports in hooks examples by @pavan-sh in #3746
- docs: add sparkjs, threepipe, react-three-map, wawa-vfx, r3f-globe, Three-VFX to community components grid by @jo-chemla in #3714
- fix(docs): remove outdated koestlich README link by @alex-marinov in #3767
- docs(tutorials): add STL loading to the Loading Models guide by @BenMalaga in #3787
- fix(core): request a frame when an object is removed with frameloop="demand" by @xaviergonz in #3976
- fix(types): only register three constructors as intrinsic elements by @DennisSmolek in #4002
- fix(core): follow devicePixelRatio changes by @tonyblu331 in #3959
- docs: add Codesandbox preview images by @abernier in #4004
- refactor(fiber): clarify v9 core domain boundaries by @krispya in #4008
- docs: use the built-in version switcher of @pmndrs/docs 4 by @abernier in #4005
- docs: adopt the default pmndrs palette of @pmndrs/docs 4.20 by @abernier in #4011
- chore: add a pull request template by @DennisSmolek in #4019
- docs: fix two dead links in testing and basic animations pages by @SatvikMishra08 in #4024
- fix(fiber): port the Portal leak fixes from v10 by @wrangelvid in #4030
New Contributors
- @alex-marinov made their first contribution in #3767
- @BenMalaga made their first contribution in #3787
- @xaviergonz made their first contribution in #3976
- @SatvikMishra08 made their first contribution in #4024
- @wrangelvid made their first contribution in #4030
Full Changelog: v9.8.1...v9.8.2