minor detail: I think currentState instead of newState will better communicate that the state was already applied.