-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix React 19 deprecation warning when accessing child ref pre-19 way (#…
…1416) [#1343] Fix React 19 deprecation warning when accessing child ref pre-19 way `child.ref` is deprecated, and generates a warning in the console in R19 because refs are now first-class props. Check the React version at runtime and if `>=19`, access it via the props; otherwise, keep accessing it as before (a property of the child React element object).
- Loading branch information
1 parent
ffae03a
commit e766841
Showing
5 changed files
with
67 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'focus-trap-react': patch | ||
--- | ||
|
||
Fix deprecation warning in React 19 when accessing ref the pre-v19 way |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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