Is it possible to override the layout.tsx of the parent directory?
Unanswered
Dwarf Crocodile posted this in #help-forum
Dwarf CrocodileOP
I've been trying to make an override of HTML on my sub page to remove the hooks that applies to the rest of the website. Can this be done without me having to move all the pages to a (...) named route with the hooks layout?
4 Replies
@Dwarf Crocodile I've been trying to make an override of HTML on my sub page to remove the hooks that applies to the rest of the website. Can this be done without me having to move all the pages to a (...) named route with the hooks layout?
no, you can't override layout from child but you can make two separate route groups that have differing root layout.
you.... maybe perhaps can just disable the hook on run time via react.context?
or just usePathname and disable the hook if path === something on root layout?
feels like an XY problem