Using prefixes in route paths and layouts like `/@{$username}`
migrating from next to start and struggling to get this setup working.
nextjs router setup:
this is accompanied with a rewrite in the next config like so, which accomplishes the
/@username
route
i currently have:
with this setup, the notFoundComponent defined in __root is triggering for any /@username
route. i'm sure this is something incredibly simple and i'm just misunderstanding how layouts work3 Replies
harsh-harlequin•2w ago
this is how you define a prefix https://tanstack.com/router/latest/docs/framework/solid/guide/path-params#defining-prefixes
Path Params | TanStack Router Solid Docs
Path params are used to match a single segment (the text until the next /) and provide its value back to you as a named variable. They are defined by using the $ character prefix in the path, followed...
harsh-harlequin•2w ago
in your case:
@{$username}.tsx
stormy-goldOP•2w ago
perfect, knew it had to be that simple. thanks!