-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make sure useId can be deterministic
If the user provides an ID fallback to a component that calls useId, we need to make sure the IDs are deterministic beyond the first render. We we mistakenly used the same ID across renders, so this is fixed. this also adds a check for React's internal useId hook in React 18 and prioritizes it over our hack. We don't formally support React 18 yet but this will help get us there.
- Loading branch information
Showing
1 changed file
with
26 additions
and
21 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