T
TanStack6mo ago
genetic-orange

Understanding Layouts

I'm making a page that looks like the attached image, but I'm having trouble trying to figure out the proper way to setup the code. I want the side navigation to load once when a user first navigates to the url, but afterwards I don't want it to rerender. Right now it seems like the page does a complete re-render as I navigate to other segments of my course. I have a learn/$slug/layout.tsx and layout.index.tsx but I don't think this is the proper way to achieve this.. anyone have a clue?
No description
No description
4 Replies
genetic-orange
genetic-orangeOP6mo ago
@Tanner Linsley any clue about this one?
genetic-orange
genetic-orangeOP6mo ago
genetic-orange
genetic-orangeOP6mo ago
is maybe the trick to not have those side navigation items be links, but instead update state to have some query functions fire off again? wow, it just clicked, that's exactly what I had to do
stormy-gold
stormy-gold6mo ago
could u also have used route.tsx and outlet?

Did you find this page helpful?