Answers for "how to define jsx elements in typescript"

1

typescript type for jsx element

// JSX element type = JSX.Element - See below
//    Name       Type       props with PropType    Return type
const Component: React.FC = (props: SomePropType): JSX.Element => {
  return <div></div>;
}
Posted by: Guest on September-15-2021
0

typescript jsx element

const myDiv:JSX.Element;

mydiv = <div> hi </div>
Posted by: Guest on November-05-2021

Code answers related to "how to define jsx elements in typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language