Answer the question
In order to leave comments, you need to log in
How to change the state of a component on scroll?
There is a Collapse component, with material-ui that hides some content.
<Collapse in={collapsed}>
<div>Some Content</div>
</Collapse>
const [collapsed, setCollapsed] = React.useState(true);
const handleCollapse = () => {
setCollapsed(collapsed => !collapsed);
};
Answer the question
In order to leave comments, you need to log in
Yes, you can hang an event handler on a component through the React synthetic event - onWheel
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question