Examples/Routing/Pages difference static vs reload
I'm noob and still learning...sorry for the trivial question.
In the official example: https://nuxt.com/docs/examples/routing/pages
I don't understand what difference should be between the
parent/reload-[id]
and parent/static-[id]
pages.
I thought the presence of key:
in the static-[id]
page, should prevent the re-rendering as described in Child Route Keys. Avoiding the increment of the reloads
var, and the onMounted()
execution.
So, what is the behavioral difference between the two routes: parent/reload-[id]
and parent/static-[id]
?
And the meaning of key
in the definePageMeta()
arg?
Thanks!Nuxt
Pages · Nuxt Examples
This example shows how to use the pages/ directory to create application routes.
4 Replies
Here the answer: https://github.com/nuxt/examples/issues/74#issuecomment-2041646758
GitHub
Difference between static and reload (in Routing/Pages)? · Issue #7...
In the routing/pages example, what should be the difference between the parent/reload-[id] and parent/static-[id] pages? In the parent/static-[id] page code are added these lines: definePageMeta({ ...
so
parent/static-[id]
works as both a static and dynamic pageI think it avoids re-rendering when you come from a route with the same key
I see