Answers for "how to give children in react typescript"

18

react children typescript

interface Props {
  children: JSX.Element[] | JSX.Element
}
Posted by: Guest on June-29-2020
1

how to pass children in react typescript

type Props = {
  title: string,
  children: JSX.Element,
};
const Page = ({ title, children }: Props) => (
  <div>
    <h1>{title}</h1>
    {children}
  </div>
);
Posted by: Guest on November-06-2021

Code answers related to "how to give children in react typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language