T
TanStack2mo ago
robust-apricot

How to render two routes at the same time (route inside another route)?

I have two panels of content on a page, side by side. One is quite basic, just some information that I'm getting, and is a perfect candidate for SSR. The other panel is more advanced, based 100% on user interactions and doesn't at all make sense for SSR. That's why I'd like to separate into two routes. I was thinking that if I had these routes:
/$post.tsx
/$post._aside.tsx
/$post.tsx
/$post._aside.tsx
and I added return (<Outlet/>) in $post.tsx, it would render $post._aside inside $post.tsx. But that doesn't seem to be the case, $post._aside doesn't match at all, according to TanStack Router devtools. What's the proper way to have both routes match at the same time? I need the parameter in both routes If you want to check the codesandbox, make sure to edit the url in the preview to /123 or something to trigger the $post route. Notice that the outlet doesn't render the pathless route https://codesandbox.io/p/github/revosw/tanstack-start-pathless/main
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?