-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: createPortal effect merging stale data from initial render #3255
Merged
CodyJasonBennett
merged 1 commit into
pmndrs:master
from
notrabs:fix/create-portal-state-merge
May 8, 2024
Merged
fix: createPortal effect merging stale data from initial render #3255
CodyJasonBennett
merged 1 commit into
pmndrs:master
from
notrabs:fix/create-portal-state-merge
May 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- The missing dependency on the inject function causes the effect to update the store with stale data when the parent store updates - The 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 b4e0e3a:
|
Testing locally, I now get the expected sequence of events (using the minimal repro): |
r4ai
referenced
this pull request
in r4ai/r4ai.dev
May 15, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@react-three/fiber](https://togithub.com/pmndrs/react-three-fiber) | [`8.16.3` -> `8.16.6`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.16.3/8.16.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-three%2ffiber/8.16.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-three%2ffiber/8.16.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-three%2ffiber/8.16.3/8.16.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-three%2ffiber/8.16.3/8.16.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>pmndrs/react-three-fiber (@​react-three/fiber)</summary> ### [`v8.16.6`](https://togithub.com/pmndrs/react-three-fiber/releases/tag/v8.16.6) [Compare Source](https://togithub.com/pmndrs/react-three-fiber/compare/v8.16.5...v8.16.6) #### What's Changed - fix(applyProps): null check indeterminate instances by [@​CodyJasonBennett](https://togithub.com/CodyJasonBennett) in [https://github.com/pmndrs/react-three-fiber/pull/3261](https://togithub.com/pmndrs/react-three-fiber/pull/3261) **Full Changelog**: pmndrs/react-three-fiber@v8.16.5...v8.16.6 ### [`v8.16.5`](https://togithub.com/pmndrs/react-three-fiber/releases/tag/v8.16.5) [Compare Source](https://togithub.com/pmndrs/react-three-fiber/compare/v8.16.4...v8.16.5) #### What's Changed - Use new JSX runtime by [@​eps1lon](https://togithub.com/eps1lon) in [https://github.com/pmndrs/react-three-fiber/pull/3256](https://togithub.com/pmndrs/react-three-fiber/pull/3256) - fix: Correct JSX module augmentation for React 19 types by [@​eps1lon](https://togithub.com/eps1lon) in [https://github.com/pmndrs/react-three-fiber/pull/3258](https://togithub.com/pmndrs/react-three-fiber/pull/3258) #### New Contributors - [@​eps1lon](https://togithub.com/eps1lon) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/3256](https://togithub.com/pmndrs/react-three-fiber/pull/3256) **Full Changelog**: pmndrs/react-three-fiber@v8.16.4...v8.16.5 ### [`v8.16.4`](https://togithub.com/pmndrs/react-three-fiber/releases/tag/v8.16.4) [Compare Source](https://togithub.com/pmndrs/react-three-fiber/compare/v8.16.3...v8.16.4) #### What's Changed - fix: createPortal effect merging stale data from initial render by [@​notrabs](https://togithub.com/notrabs) in [https://github.com/pmndrs/react-three-fiber/pull/3255](https://togithub.com/pmndrs/react-three-fiber/pull/3255) #### New Contributors - [@​notrabs](https://togithub.com/notrabs) made their first contribution in [https://github.com/pmndrs/react-three-fiber/pull/3255](https://togithub.com/pmndrs/react-three-fiber/pull/3255) **Full Changelog**: pmndrs/react-three-fiber@v8.16.3...v8.16.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/r4ai/r4ai.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced Jul 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3253
inject
function, which caused the effect to update a portal's store with stale data from the initial render