-
I can see only 2 options that would allow me to set a class on the body based on the route I am at, given that the name of the class is only known in the subroute module, because its dynamic, e.g. being fetched from a database.
So far I couldn't find a good way to do it, what am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
You can use the useMatches hook to get the data returned by any route, including child routes. |
Beta Was this translation helpful? Give feedback.
-
Yeah I saw this possibility, but feels like a hack, misused api, what I really want is an official way to use a different root.tsx |
Beta Was this translation helpful? Give feedback.
You can use the useMatches hook to get the data returned by any route, including child routes.