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
[react] React 18 types #56210
Merged
typescript-bot
merged 29 commits into
DefinitelyTyped:master
from
eps1lon:feat/react/18-breaking
Apr 7, 2022
Merged
[react] React 18 types #56210
typescript-bot
merged 29 commits into
DefinitelyTyped:master
from
eps1lon:feat/react/18-breaking
Apr 7, 2022
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
This was referenced Oct 5, 2021
Still, if your component doesn't use |
whiteghostDev
added a commit
to whiteghostDev/Awesome-React
that referenced
this pull request
Aug 6, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
codechieflee
added a commit
to codechieflee/react-hook-swr
that referenced
this pull request
Aug 19, 2023
cedev935
pushed a commit
to cedev935/React-TypeScript
that referenced
this pull request
Sep 11, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
muscliary
pushed a commit
to muscliary/swr
that referenced
this pull request
Sep 12, 2023
aleksandaralek
added a commit
to aleksandaralek/typescript-react-cheatsheet
that referenced
this pull request
Oct 24, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
xbucks
pushed a commit
to xbucks/react-cheatsheets
that referenced
this pull request
Oct 24, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
8 tasks
le-pus
pushed a commit
to le-pus/React-Typescript
that referenced
this pull request
Oct 26, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
5 tasks
8 tasks
2 tasks
atsumi000105
added a commit
to atsumi000105/typescript-cheatsheets-react
that referenced
this pull request
Dec 8, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
secretsuperstar1109
added a commit
to secretsuperstar1109/react-typescript-cheatsheets
that referenced
this pull request
Dec 9, 2023
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
champion119
added a commit
to champion119/react
that referenced
this pull request
Jan 5, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
forbesus
added a commit
to forbesus/OpenEmojiBattler
that referenced
this pull request
Feb 18, 2024
SManOlaf38
pushed a commit
to SManOlaf38/react_typescript
that referenced
this pull request
Feb 20, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
SManOlaf38
added a commit
to SManOlaf38/react_typescript
that referenced
this pull request
Feb 20, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
rising-dragon360
added a commit
to rising-dragon360/react
that referenced
this pull request
Mar 13, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
2 tasks
EugeneYoona
added a commit
to EugeneYoona/React_full_src
that referenced
this pull request
Apr 10, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
snowMan128
added a commit
to snowMan128/TypeReact
that referenced
this pull request
Apr 15, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
fairskyDev0201
added a commit
to fairskyDev0201/typescript-cheatsheet
that referenced
this pull request
Apr 17, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
bluesky4293
added a commit
to bluesky4293/React
that referenced
this pull request
Apr 27, 2024
* feat: add information about change in React typing See DefinitelyTyped/DefinitelyTyped#56210. * chore: change wording
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Check Config
Changes a module config files
Critical package
Edits multiple packages
Huge Change
Maintainer Approved
Self Merge
This PR can now be self-merged by the PR author or an owner
Too Many Owners
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.
Overwhelmed by compile errors after upgrading to
@types/react@^18.0.0
? Check out https://github.com/eps1lon/types-react-codemod.Upgrading to React 18 with TypeScript
Breaking Changes
Removal of implicit children
For components that do implement
children
but relied on their implicit declaration fromReact.FunctionComponent
orReact.Component
:interface Props { + children?: React.ReactNode; } class SomeClassComponents React.Component<Props> { render() { return <div>{this.props.children}</div> } } const SomeFunctionComponent: React.FunctionComponent<Props> = props => <div>{props.children}</div>
Please check Removal Of Implicit Children for the rationale.
I may have a solution to bring these back on-demand without patching the published types (watch #59751)
Remove
{}
fromReactFragment
This was never correct and mostly required to interop with implicit
children
.this.context
becomesunknown
Was
any
before. The community mostly prefersunknown
by default (any
would silently be unsound).Restore old behavior:
Remove deprecated types
Bringing the terminology more in line with how they're called in the React docs and repository.
Issues
Closes #46691
Closes #34237
Closes #56026
Closes #52873
Follow-up:
react-dom/node-stream
entrypoint from v17 since that no longer exists there either ([react-dom] Remove /node-stream entrypoint #59747)createMutableSource
from/experimental
([react] Remove unstable_createMutableSource #59746)react-dom/server
as mentioned in [react] React 18 types #56210 (comment) ([react-dom] AddrenderToPipeableStream
andrenderToReadableStream
#59748)react-test-renderer
for React 18 ([react-test-renderer] Publish as v18 #59813