suppose i have a div element
<div
style={{
borderTopLeftRadius: "10px",
borderTopRightRadius: "10px",
background: "#edf2f8",
border: "1px solid #edf2f8",
borderBottom: "0px",
width:"300px",
marginLeft:"20px",
backgroundPosition: "center",
}}
>
hello world
</div>
I want to use the onclick function to hide/show state of the div . For example when a user clicks in the div I hide it .. How can I achieve that in react ?