I have a very simple dynamic route. The page is in the following directory: ~/pages/explore/initiative/[id].vue
When I navigate to that page via NuxtLink, it seems to be making the request several times.
I added the following code to [id].vue to verify if this is the case
const route = useRoute()
const initiativeId = route.params.id;
console.log("Route Params: ", route.params.id);
Here's an example of the output
Route Params: 18
WARN [@vue/server-renderer] Skipped rendering unsafe attribute name: "
Route Params: preload.js.map
So it seems that the ID is being switched to preload.js.map. I didn't write any code to that switch, so it seems to be the framework making the request or some other package included within.
Not sure if this is relevant, but there's also an index.vue page in ~/pages/explore/initiative/index.vue
initiativeIda computed:const initiativeId = computed(() =>route.params.id), and then console.log:console.log("Route Params: ", initiativeId.value). Moreover, move the console.log toonMountedand see what happens. Just giving you things to try.