Electric field induced ion migration is a well-known phenomenon in perovskite, but the consequences are notorious, and thus needs to be prevented. Here, on the other hand, the authors cleverly manipulate this event for realising resistive random-access memory and light-emitting electrochemical cell in one device based on CsPbBr3 quantum dots.