Simple question . How can I use Vanilla JS in my React Component?
For exemple:
This is not working, but WHY ??
function Home() {
const title = document.querySelector('h1');
console.log(title) // undefined
return (
<div >
<h1>Pouet</h1>
</div>
);
}