Is there a possibility to define multiple root components and assign them in the wasp config file per page? So instead of one global root component i would want something like:
route HomeRoute { path: "/", to: Home }page Home { authRequired: true, component: import Main from "@src/client/pages/home" rootComponent: import RootForLoggedInUsers from "@src/client/root/root-for-logged-in-users"}
route HomeRoute { path: "/", to: Home }page Home { authRequired: true, component: import Main from "@src/client/pages/home" rootComponent: import RootForLoggedInUsers from "@src/client/root/root-for-logged-in-users"}
This would allow for different setups for different roles / subpages? Some usecases: - Different Layouts for auhenticated pages vs public pages - Some pages need a Cookie Banner and some might not - I only need tracking / Analytics on some flows
I know i could just inject these on demand in each PageComponent but was wondering what you guys think about a more modular approach to define this root component additionally per page instead of globally only.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.