0

React.FC type doesn't contain children prop anymore. How should I type my components now?

jsnoob123
  • 43
  • 1
  • 5

1 Answers1

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 <></>
}