DEV Community

Discussion on: Learn useState() in 5minutes

Collapse
 
morganoliveira2018 profile image
morganOliveira2018

Great explanation. Do you know what it means when you switch to useState (true)? For example: const [button, setButton] = useState (true); Could you explain me.

Collapse
 
developeratul profile image
Minhazur Rahman Ratul

You can do conditional rendering by putting a boolan value to your state variable. This video might help you. :)