Skip to content

Commit 06271e0

Browse files
authored
Change patterns_by_usecase to use ReactNode (#630)
1 parent dd8176d commit 06271e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/advanced/patterns_by_usecase.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ You can type the **structure** of your children: just one child, or a tuple of c
373373
The following are valid:
374374

375375
```ts
376-
type OneChild = React.ReactElement;
377-
type TwoChildren = [React.ReactElement, React.ReactElement];
376+
type OneChild = React.ReactNode;
377+
type TwoChildren = [React.ReactNode, React.ReactNode];
378378
type ArrayOfProps = SomeProp[];
379379
type NumbersChildren = number[];
380380
type TwoNumbersChildren = [number, number];

0 commit comments

Comments
 (0)