I have the following structure:
<div>
<div>
DIV_1
</div>
</div>
<div>
<div>
DIV_2
</div>
</div>
I'm trying to change the width of DIV_1 when DIV_2 is hovered over. I've seen many solutions that involve setting a state and using onMouseEnter, onMouseLeave
but that solution doesn't work well for my project.
I've seen how to solve this using css and was wondering how I can do the same thing with JSX styling?
Note: DIV_1 and DIV_2 do not share a direct parent. I need to be able to access either the parent of DIV_2 or DIV_2 itself from DIV_1.