set component state before calling storeDidChange