Bug: state wouldnt update if element didnt have an animation