Hi guys, first time posting.
I find myself in a situation where a parent route has a
<div> element that has a CSS class which causes problems for me.
I intend to ‘switch off’ that class when my component is rendered because it isn’t relevant to my component, although it is relevant everywhere else.
To do this, I was planning on binding the div class to a route.js property. When the route is a certain route (the route with my component in) then switch of or change the class of the parent div.
What’s the best way to do that? Is that breaking a best practice rule? It sounds a bit bodgey.
How would YOU do it?
bit more detail: the div class restricts the width of everything inside it. My component is in a child route and is rendered inside it. But I need to be able to make a div take up the entire width, unrestricted.