pass params and searchParams into template files
#70952
PHILLIPS71
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
paramsandsearchParamsto the template.js file's propsBackground
It's understandable that the layout file doesn't receive route parameters since layouts aren't re-rendered during navigation. However, from what I understand, templates are re-rendered between routes, so it would make sense for route parameters to be passed to the template.
It simplifies situations where you need to render content based on route parameters, and handling it on the server offers a much better user experience. It's also far easier, as it eliminates concerns about managing loading states or content skeletons.
Proposal
It should work like the page file, where both
paramsandsearchParamsare passed in.Beta Was this translation helpful? Give feedback.
All reactions