Next JS prefetch return data

38 views Asked by At

Is there a way to return the json file that the prefetch method calls?

for example If I call

router.prefetch('/myPage') NextJs makes a network request to myPage.json

The data I need is in that myPage.json file but the prefetch method doesn't have a return value.

0

There are 0 answers