SolidJSS
SolidJSโ€ข3y agoโ€ข
1 reply
avant

Nested routing not working

One video is with npm, the other with pnpm
Both not working, what am I doing wrong?

cat.tsx
import { A, Outlet } from "solid-start";

const CatLayout = () => {
    return (
        <>
            <A href="/cat">Cat</A>
            <A href="/cat/dog">Dog</A>
            <hr />
            <Outlet />
        </>
    );
};

export default CatLayout;


/cat/index.tsx
const Cat = () => {
    return <>Cat</>;
};

export default Cat;


/cat/dog.tsx
const Dog = () => {
    return <>Dog</>;
};

export default Dog;
Was this page helpful?