import { useEffect } from "react";
import "./styles.css";
export default function App() {
useEffect(() => {
const handleWheel = (e) => {
if (e.ctrlKey || e.metaKey) e.preventDefault();
console.log(e);
};
window.addEventListener("wheel", handleWheel, { passive: false });
return () => {
window.removeEventListener("wheel", handleWheel, { passive: true });
};
}, []);
return (
<div className="App">
<div className="hover">Hover me </div>
</div>
);
}
Can someone explain me what is the roll of {passive:false} in this code or{passive:true} in the code