-
Notifications
You must be signed in to change notification settings - Fork 98
Add support for React 19.x #1822
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7e08f44
bumping all react deps
williamlark 4bab588
add changeset
williamlark c2206c7
updating wording
williamlark d0d4dbd
bump ink version to support react 19
williamlark 7ee4ced
fixing react-is issue
williamlark 083efd0
chore removing unneeded export
williamlark 1c86740
Merge branch 'master' into react-19-support
williamlark d64b872
renaming react-router-dom import
williamlark 9efaf4d
Merge branch 'master' into react-19-support
williamlark 99fb2ac
updating isFragment comment
williamlark a1b234a
update changeset wording
williamlark 3cd19cb
addressing some PR comments
williamlark 2900b6e
fixing some comments
williamlark f0c9388
updating link to exact commit reference
williamlark 0cb6a00
Merge branch 'master' into react-19-support
williamlark 3f4cba1
removing new lines from lists
williamlark 96f392f
moving newline const
williamlark 15e52ec
Merge branch 'master' into react-19-support
williamlark f73643f
fixing react 19 type errors
williamlark 5cbc6e2
Merge branch 'master' into react-19-support
williamlark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 @@ | ||
| --- | ||
| 'braid-design-system': patch | ||
| '@braid-design-system/codemod': patch | ||
| '@braid-design-system/docs-ui': patch | ||
| --- | ||
|
|
||
| Expand the peer dependency range to support React 19. | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
|
williamlark marked this conversation as resolved.
|
This file contains hidden or 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,26 @@ | ||
| import type { ReactElement } from 'react'; | ||
|
|
||
| const REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'); | ||
| const LEGACY_REACT_ELEMENT_TYPE = Symbol.for('react.element'); | ||
| const REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); | ||
|
|
||
| /** | ||
| * A subset of the logic from `react-is` that supports both React 18 and 19. | ||
| * We only use this to check for React fragments so only that code has been used. | ||
| * @see https://github.com/facebook/react/blob/main/packages/react-is/src/ReactIs.js#L40 | ||
|
williamlark marked this conversation as resolved.
Outdated
|
||
| * | ||
| * _Note: once we drop support for React 18 we should move back to using `react-is`_ | ||
| */ | ||
|
|
||
| const isReactElementType = (value: any) => { | ||
| if (typeof value !== 'object' || value === null) { | ||
| return false; | ||
| } | ||
| const $$typeof = value.$$typeof; | ||
| return ( | ||
| $$typeof === REACT_ELEMENT_TYPE || $$typeof === LEGACY_REACT_ELEMENT_TYPE | ||
| ); | ||
| }; | ||
|
|
||
| export const isFragment = (value: any): value is ReactElement => | ||
| isReactElementType(value) && value.type === REACT_FRAGMENT_TYPE; | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.