I am using Remix for a project, and I am having issues setting up breadcrumbs. I am using the flat folder system to define routes and have defined some as follows:
app/routes/_app/route.tsx // Layout for the application with the breadcrumbs
app/routes/_app.inquiries._index/route.tsx // /inquiries
app/routes/_app.inquiries.$inquiryId/route.tsx // inquiries/1
I have defined the handles for each route as described in the breadcrumbs guide here. However, while on the URL /inquiries/1
, the hook useMatches only returns the root route, the layout route, and the route with the detail, completely skipping the index route. I would assume that while being on /inquiries/1
, I would see four routes: /, /inquiries, /inquiries/, /inquiries/1
.
Where am I wrong?