You would need to keep a state variable if you want to track it.
You don't really need to track it usually though, generally if you want it shown/hidden just call the appropriate command when you need it.
You don't really need to track it usually though, generally if you want it shown/hidden just call the appropriate command when you need it.