You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return <Comp>{{}}</Comp> // Runtime Error: Objects not valid as React Child!
92
+
}
93
+
```
94
+
95
+
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.
96
+
97
+
[Thanks @pomle for raising this.](https://github.com/typescript-cheatsheets/react/issues/357)
98
+
99
+
</details>
100
+
74
101
<details>
75
102
<summary><b>JSX.Element vs React.ReactNode?</b></summary>
0 commit comments