How to make a global layout?

I'd like to make a single layout for all of my pages within the route structure, but I'm not quite sure how to do this. If I make a routes/(root).tsx file, then the / path shows up as that html & css, but nothing from routes/index.tsx populates the <Outlet />. And if I navigate to /login then the html & css from the layout doesn't appear at all. So I'm not sure what it should be instead.
2 Replies
knpwrs
knpwrs3y ago
With a file called (root).tsx as your global layout you should make a file at (root)/index.tsx to be the content at /
Pridgey
PridgeyOP3y ago
So routes/(root).tsx and routes/(root)/index.tsx like that? Yup, that did it Thank you very much

Did you find this page helpful?