Answer the question
In order to leave comments, you need to log in
What are the best component types to use in react + ts?
Hello.
It is possible like this:
const Component1: React.FC = () => {
return (
<div>
FC
</div>
)
}
function Component2(){
return (
<div>
JSX.Element
</div>
)
}
Answer the question
In order to leave comments, you need to log in
interface Props {
someProp: string;
}
const Example: React.FC<Props> = ({ someProp }) => (
<div>{someProp}</div>
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question