Replies: 1 comment
-
Update: I figured it out after a bit more trial and error, but here's are the how the
import { Outlet } from "react-router";
export default function AlphaLayout() {
return (
<div>
<h1>Alpha Layout</h1>
<Outlet />
</div>
);
};
export default function AlphaRoot() {
return (
<div>
<h1>Alpha Root</h1>
</div>
);
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I was wondering if anyone can provide an example of how different layout would work for different route in file route. The documentation didn't seem to have any example on what I am trying to do.
I have the
routes
folder underapp
for the routes. I wanted to have it configured where thealpha
route would have one layout, andbeta
route to have a different layout, and anything else not define, would just default toroot
layout.While searching through the internet, I tried different things such as having a
alpha._layout/
route, or having_layout.tsx
. But none seem to work. But also I am not sure how the "layout" file should look? I tried something similar toroot.tsx
withexport function Layout
and having an<Outlet />
, but that did not seem to work.Any help would be apprecitated.
Project Structure
root.tsx
Beta Was this translation helpful? Give feedback.
All reactions