Skip to content

Commit c2ad294

Browse files
feat: add info about change of typings in react 18 (#497)
1 parent bb72886 commit c2ad294

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/basic/getting-started/basic-type-examples.md

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ function App() {
9494
This is because `ReactNode` includes `ReactFragment` which allows a `{}` type, which is [too wide](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37596#issue-480260937). Fixing this would break a lot of libraries, so for now you just have to be mindful that `ReactNode` is not absolutely bulletproof.
9595

9696
[Thanks @pomle for raising this.](https://github.com/typescript-cheatsheets/react/issues/357)
97+
98+
With the [React 18 type updates](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210), `{}` is no longer allowed in `ReactFragment`.
9799

98100
</details>
99101

0 commit comments

Comments
 (0)