Issue
React.FC type doesn't contain children prop anymore. How should I type my components now?
Solution
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 <></>
}
Answered By - dk.peytz.mjk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.