is not invoked.
You shouldn't be using this for callbacks about the state's value as there are a number of different ways it might be updated. It also gets invoked to confirm a state change, so you are executing an action before the animation will be done.
Use a