which is better to write the following code:
method 1:
if(show){
drawercStyle = {
width: 100%
}
maskStyle = {
opacity: 1
}
}
else{
drawercStyle = {
width: 0
}
maskStyle = {
opacity: 0
}
}