I want to change the opacity and pointer-events of two elements when i click another element, i searched and i was able to change the opacity using a const for the style and setState (which i dont really understand fully yet) but its a hard no on the pointer-events. I ended up writing in JQuery so you understand better what i want to do.
const App = () => {
const iluminar = () => {
$('#oscurecido').css("opacity", 0);
$('#oscurecido').css("pointer-events", "none");
$('#sesion').css("opacity", 0);
$('#sesion').css("pointer-events", "none");
}
return (
<div className="App">
<div id="oscurecido" onClick={iluminar}></div>
<Router>
<Nav/>
<Switch>
<Route path="/" exact component={Productos}/>
<Route path="/Carrito" exact component={Carrito}/>
<Route path="/" component={Err}/>
</Switch>
</Router>
{true ? <Sesion/> : null}
</div>
)
}