so it seems I'm using the latest version of Nextjs which is 13.2.4v, i also not using the app
or src
directory.
the problem is when i hover on the Link
Next component, it will send a request to the server, we know that will reduce the performance.
i found this solution and nothing works:
// pages/blog/[articleId]
const index = ({ articles }: InferGetStaticPropsType<typeof getStaticProps>) => {
return (
<div>
{articles.map(({ id, title }) => (
<div key={id}>
<h1>{id}</h1>
<Link href={`blog/${id}`} prefetch={false}>
<h2>{title}</h2>
</Link>
</div>
))}
</div>
);
};
this will just disable the pre-rendering on page load, until you hover on it will then pre-fetching and send the request to the server.
so is there any way to disable this prefetching on each hover?