How would I achieve this route pattern?
/ducks
- list of all ducks
/ducks/detail/$duckId
- modal showing duck details over top of list (<Outlet />
inside /ducks
?)
/ducks/new
- form to create new duck, but should be full page, not inside /ducks
Outlet
Layouts? what would the file/folder structure look like?1 Reply
variable-limeOP•16mo ago
Nevermind, I found a solution:
-
_list.tsx
contains a <DuckList />
component to display all ducks + an <Outlet />
- _list.index.tsx
empty route with only export const Route = createFileRoute('/ducks/_list/')();
- _list.detail.$duckId.tsx
contains the modal component with <DuckDetail />
- new.tsx
contains the <NewDuckForm />
component