liztownd/graphql-swapp

Functional component declaration in Typescript

Closed this issue · 1 comments

function Header() {

Try this syntax out. You'll find it provides much more autocomplete and type helping for your code:

interface Props {
  name: string
}
const Header: React.FunctionComponent<Props> = ({ name }) => {
  return (<></>)
};
export default Header;

Fixed!