I'm building an app with many dynamic paths involved, but Remix only support single dynamic path out of the box. I searched the docs but can't find anything that would allow me to achieve the following.
My Route structure looks like this:
$postType
- $collectionType
- - $id.tsx
- - index.tsx
- $id.tsx
- index.tsx
So it's basically a structure of post and collection types that gives me possible paths like this:
/books- renders$postType/index.tsx/books/the-shining- renders$postType/$id.tsxdynamically/books/authors- renders$postType/$collectionType/index.tsx/books/authors/steven-king- renders$postType/$collectionType/$id.tsxdynamically
Unfortunately, out of the box, it takes only the first dynamic path it finds, so /books/the-shining would point to the $postType/$collectionType/index.tsx file.
Is there any way to tell Remix from the loader, that the collection type with that slug was not found and to go to another dynamic path?
Thanks a lot for any help!