We want to keep state like this only when this replacement actually occurred. Thats why you want the promise here.