useReducer , state not reflecting properly why?

My code

I am trying to set power state to false when power button is clicked and vice versa.

I have used this power state in my DrumButtons Components

On console logging the value of power inside DrumButtons Components first it sets to false and then sets to true. I really cannot understand what is happening .

Please help me