I must define a layout (@layout.tsx) without loading a parent layout using fileRoutes in vaadin 24.4.x. How to make it?
I’m not sure I understand what you mean with “loading” in this context. Do you mean that you don’t want a @layout.tsx
file in a child directory to be rendered inside the @layout.tsx
from its parent directory?
@Leif… thanks for your interest…
In a project with file-based router.
frontend/view
- @layout.tsx (1)
- category
- -@layout.tsx (2)
How do you make layout 2 not load within layout 1 ?
That case is not (yet) supported when using the file router. You can still configure it in that way by creating your own routes.tsx
file. React Router | Reference | Hilla | Vaadin Docs shows an example of how file routes can be combined with manually configured routes.
Issue #2385 describes a suggestion of how a future Hilla version could have a feature for achieving the same with file routes.