Currently I have this React component typed as such:
import React, { FunctionComponent } from "react";
const HelloWorld : FunctionComponent = () => {
return (
<div>
Hello
</div>
);
}
export default HelloWorld;
I would not like to use arrow functions and write my component like so:
import React, { FunctionComponent } from "react";
function HelloWorld() {
return (
<div>
Hello
</div>
);
}
export default HelloWorld;
Is it possible to type normal functions as FunctionComponent?