Lets say we have
/app
/[testParam]
layout.tsx
template.tsx
page.tsx
...
I expect each of them get the same props
interface Props {
children: ReactNode;
params: {
testParam: string;
};
}
But template actually doesn't – it gets no params. Why a template never get params, but just a children?
Next.js template docs says "Templates are similar to layouts... But creates a new instance for each of their children on navigation". But it's not similar, it doesn't have access to params. Is it by design? Am i missed some configuration or misunderstood the docs?
Glad for any thoughts on this. Thank you!