I've used this a couple of times when creating a component in React using Typescript, but still not 100% certain what it means to specify 'children: React.ReactNode'. Looking for an explanation please.
Asked
Active
Viewed 239 times
0
-
Maybe related to [this](https://stackoverflow.com/questions/53688899/typescript-and-react-children-type)? There is also a good answer. – devserkan Nov 04 '19 at 08:34
-
You are welcome. I'm not familiar with TypeScript but there is a good explanation of why you use `React.ReactNode` as type since it is defined as it may include `React.Child`. – devserkan Nov 04 '19 at 08:41
1 Answers
0
You are expecting the component to return React children components. (Seems pretty obvious now I know the answer)

Kate B
- 105
- 7