DEV Community

Discussion on: Typing React Props in TypeScript

Collapse
myfatemi04 profile image
Michael Fatemi

If you want you can also just add children as an optional field with the type React.ReactNode

Collapse
bennycode profile image
Benny Neugebauer Author

Good idea! That's a self-made PropsWithChildren solution. :)