react-three-fiber
react-three-fiber copied to clipboard
fix: createPortal effect merging stale data from initial render
Fixes #3253
- Added a missing dependency on the
inject
function, which caused the effect to update a portal's store with stale data from the initial render - The store destruction has been moved to a separate hook, so it continues to run only on component unmount
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 b4e0e3a88e3dcd5e6384c41b71f35fbfc8d24a17:
Sandbox | Source |
---|---|
example | Configuration |
Testing locally, I now get the expected sequence of events (using the minimal repro):