-
I have route files similar to this:
I want to use defineRoutes in plugins: [
remix({
routes(defineRoutes) {
return defineRoutes((route) => {
route('customer', 'shared/customer.tsx', () => {
route('', 'shared/customer-index.tsx', { index: true });
route('nav', 'shared/customer-nav.tsx')
})
}
}
})
] I don't know how to replicate the common "_sections" layout, crucially so "_sections" or "sections" does NOT appear in the URL. The examples in the official docs don't mention this case. Does anyone know how to do this, or could point me to a similar example? And a quick follow-up, if I want to achieve the same effect as non-layout-nesting routes, I just don't add them as children? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I didn't realise you could use the same path value more than once in the route definitions, by doing this same path with different files, I can achieve what I was asking about in my question. For example, you can do like:
|
Beta Was this translation helpful? Give feedback.
I didn't realise you could use the same path value more than once in the route definitions, by doing this same path with different files, I can achieve what I was asking about in my question.
For example, you can do like: