500 brothers. why nextjs fetch all json files at the first time I land on the page. I am used getstaticprops for those pages. I am afraid that will affect the performance.i expect that the json just should be fetched when I land on that page.
enter image description here
>Solution :
Your problem is you’re using Link and by default, Link has prefetch={true} which means your page will prefetch all your data from all other pages’ links. You can check this doc.
These prefetching behaviors run in the background, so you don’t need to worry about performance.
If you are still concerned about it, you can set Link like below
<Link prefetch={false} href={...}>
<a>...</a>
</Link>
Side note that whenever you hover on Link, it will start prefetching, although you set prefetch={false}.