React.FC type doesn't contain children prop anymore. How should I type my components now?
Asked
Active
Viewed 291 times
0
-
https://stackoverflow.com/q/71788254/11399221 hope this helps you. – Arman Aug 30 '22 at 12:56
-
thank you, my bad I didn't google enough, sorry – jsnoob123 Aug 30 '22 at 14:22
1 Answers
1
Not sure I understand the question, but you can add children as prop like usual and define an interface for the props:
interface YourComponentProps {
children: ReactNode;
}
export const YourComponent = (props: YourComponentProps) => {
return <></>
}

dk.peytz.mjk
- 26
- 3