Template doesn't re-render #64543
Unanswered
nicnocquee
asked this question in
Help
Replies: 1 comment
-
Related issue I think #60032 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
According to the docs,
Template
is likeLayout
but it's re-rendered on navigation. However after playing with it, I noticed that when navigating to a different path that uses the samePage
component, it doesn't re-rendered.For example, two pages in
/app/admin/[id]/page.tsx
and/app/guest/[id]/page.tsx
with a template/app/template.tsx
. Say you're currently in/admin/1
page. Navigating to/guest/1
will re-render the template. However navigating to/admin/2
from/admin/1
doesn't re-render the template. Is this a bug or intentional?A demo: https://www.nico.fyi/experiments/suspense-demo/with-template/admin/1 and accompanying blog post: https://www.nico.fyi/blog/understanding-layout-and-template-next-app-router
Additional information
Beta Was this translation helpful? Give feedback.
All reactions