pmndrs / react-three-fiber

🇨🇭 A React renderer for Three.js
https://docs.pmnd.rs/react-three-fiber
MIT License
27.64k stars 1.6k forks source link

[v9] fix(reconciler): don't implement (un)hideInstance methods #3241

Closed CodyJasonBennett closed 7 months ago

CodyJasonBennett commented 7 months ago

Fixes a regression from #3224 where React will hide but never unhide WIP instances during Suspense in the glTF example. Need to report upstream as we're uniquely sensitive to this behavior, although we work around WIP or Suspenseful instances in a more robust way. For that reason, we can remove these hooks as they are impure and produce an invalid tree.

I added a failing test in f1a296db1c45e19810089fb9c0efaa259287fb1c to demonstrate this behavior. Fails on v9, passes after this PR. This is since React 19.

codesandbox-ci[bot] commented 7 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bb392e60ab1f35d1ff65ce9ee45a926411b9908c:

Sandbox Source
example Configuration
krispya commented 7 months ago

Looks good here.