-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[StaticSetFilter] Remove potential layoutEffect infinite loop (#24542)
## Summary & Motivation Fix potential infinite loop caused by useLayoutEffect and isFirstRenderRef. The layout and regular effects were both gated by isFirstRenderRef, but since the effect is responsible for setting this flag, React's behavior allows useLayoutEffect to loop. This PR separates the refs for layout and regular effects to prevent the looping issue. ## How I Tested These Changes jest tests ## Changelog NOCHANGELOG
- Loading branch information
Showing
2 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
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
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
dfa8d75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-fnqkc2pa8-elementl.vercel.app
Built with commit dfa8d75.
This pull request is being automatically deployed with vercel-action