I just got started with using TypeScript in Next JS and I keep getting this eslint error even after trying what the eslint docs say:
Here is my component:
import type { NextPage } from "next";
const Home: NextPage = () => {
return (
<div>Home</>
)
}
export default Home;
The code however displays the eslint error: Function component is not a function declarationeslintreact/function-component-definition.
I tried to use it this way but also got errors:
export default function Home<NextPage> () {
return (
<div>Home</div>
)
}