From dd07d144a6bd1766c75cf9152a5a84853dc0a233 Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Mon, 3 Jul 2023 15:00:35 +0100 Subject: [PATCH] Change patterns_by_usecase to use ReactNode --- docs/advanced/patterns_by_usecase.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/patterns_by_usecase.md b/docs/advanced/patterns_by_usecase.md index 7ff00f6b..4a8fdb86 100644 --- a/docs/advanced/patterns_by_usecase.md +++ b/docs/advanced/patterns_by_usecase.md @@ -373,8 +373,8 @@ You can type the **structure** of your children: just one child, or a tuple of c The following are valid: ```ts -type OneChild = React.ReactElement; -type TwoChildren = [React.ReactElement, React.ReactElement]; +type OneChild = React.ReactNode; +type TwoChildren = [React.ReactNode, React.ReactNode]; type ArrayOfProps = SomeProp[]; type NumbersChildren = number[]; type TwoNumbersChildren = [number, number];