This is my code:
render() {
return (
<div className='btndiv'>
<button className='btn'>Hide</button>
</div>
);
}
I'm trying to change the class of the div from .btndiv to .btndivhidden when the button is clicked, essentially hiding it from the screen.
.btndivhidden{
display: none
}
I've looked at various solutions but many seem too complex and lengthy. What's the most efficient and concise way to achieve this?