it has stateAt updated when state is updated