This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix suppression of re-renders with Suspense #952
Closed
Closed
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
facebook-github-bot
added
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
labels
Apr 2, 2021
This pull request was exported from Phabricator. Differential Revision: D27547654 |
Summary: Pull Request resolved: facebookexperimental#952 Fix the ability to suppress re-rendering React Components that depends on Recoil Selectors which evaluate to equivalent values via reference equality. The problem was that when components observed a selector in a pending state it would suspend using Suspense. This would cancel the execution of `useEffect()`'s and skip recording the previous selector values. Then, if the selector reverted to the same value it had before the suspense, it wouldn't appear the value changed and the component could get stuck in Suspense. This fix also fixes the extra re-render observed in the `Recoil_PublicHooks-test.js` when the React Tracing API was removed. Differential Revision: D27547654 fbshipit-source-id: 37e67cdb248d452b4714ae8748274b8cf2b4c61b
drarmstr
force-pushed
the
export-D27547654
branch
from
April 17, 2021 07:36
045f358
to
f46a246
Compare
This pull request was exported from Phabricator. Differential Revision: D27547654 |
PR didn't auto-close with commit landing. |
This pull request has been merged in f17888e. |
AlexGuz23
pushed a commit
to AlexGuz23/Recoil
that referenced
this pull request
Nov 3, 2022
Summary: Pull Request resolved: facebookexperimental/Recoil#952 Fix the ability to suppress re-rendering React Components that depends on Recoil Selectors which evaluate to equivalent values via reference equality. The problem was that when components observed a selector in a pending state it would suspend using Suspense. This would cancel the execution of `useEffect()`'s and skip recording the previous selector values. Then, if the selector reverted to the same value it had before the suspense, it wouldn't appear the value changed and the component could get stuck in Suspense. This fix also fixes the extra re-render observed in the `Recoil_PublicHooks-test.js` when the React Tracing API was removed. Reviewed By: davidmccabe Differential Revision: D27547654 fbshipit-source-id: 8e155154a7dd6160e9e7e493c7dfddd54f309ca9
snipershooter0701
pushed a commit
to snipershooter0701/Recoil
that referenced
this pull request
Mar 5, 2023
Summary: Pull Request resolved: facebookexperimental/Recoil#952 Fix the ability to suppress re-rendering React Components that depends on Recoil Selectors which evaluate to equivalent values via reference equality. The problem was that when components observed a selector in a pending state it would suspend using Suspense. This would cancel the execution of `useEffect()`'s and skip recording the previous selector values. Then, if the selector reverted to the same value it had before the suspense, it wouldn't appear the value changed and the component could get stuck in Suspense. This fix also fixes the extra re-render observed in the `Recoil_PublicHooks-test.js` when the React Tracing API was removed. Reviewed By: davidmccabe Differential Revision: D27547654 fbshipit-source-id: 8e155154a7dd6160e9e7e493c7dfddd54f309ca9
eagle2722
added a commit
to eagle2722/Recoil
that referenced
this pull request
Sep 21, 2024
Summary: Pull Request resolved: facebookexperimental/Recoil#952 Fix the ability to suppress re-rendering React Components that depends on Recoil Selectors which evaluate to equivalent values via reference equality. The problem was that when components observed a selector in a pending state it would suspend using Suspense. This would cancel the execution of `useEffect()`'s and skip recording the previous selector values. Then, if the selector reverted to the same value it had before the suspense, it wouldn't appear the value changed and the component could get stuck in Suspense. This fix also fixes the extra re-render observed in the `Recoil_PublicHooks-test.js` when the React Tracing API was removed. Reviewed By: davidmccabe Differential Revision: D27547654 fbshipit-source-id: 8e155154a7dd6160e9e7e493c7dfddd54f309ca9
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
performance
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.
Summary:
Fix the ability to suppress re-rendering React Components that depends on Recoil Selectors which evaluate to equivalent values via reference equality.
The problem was that when components observed a selector in a pending state it would suspend using Suspense. This would cancel the execution of
useEffect()
's and skip recording the previous selector values. Then, if the selector reverted to the same value it had before the suspense, it wouldn't appear the value changed and the component could get stuck in Suspense.Differential Revision: D27547654