@HelloWorld wrote:
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?
Thanks
Posts: 2
Participants: 2