#layout with param

5 messages · Page 1 of 1 (latest)

hushed gale
#

please share a minimal example on Stackblitz

worldly shadow
#

Seems a bit extensive, my question is basically, can I create a layout route with params, and use those params within that layout route

raw moat
#

It depends what you are going for.
IMO, the layout route is mostly for sharing stuff between Routes without affecting the URL.

If you are the URL to be brought into play, you could chuck this stuff into the route.tsx file.

src/routes
  $gameServerId/
    route.tsx <- <Outlet /> would go here
    index.tsx
    something-else.tsx

and it receives the params.

If I'm on the wrong track here, then a example on Stackblitz would probably be the best way to demonstrate what you are looking for? If its really abstract, maybe even something in Excalidraw.