Mixed-dimensional heterostructures of 2D perfluoroarene perovskite phases are used in resistive switching memories based on perovskite solar cells, showing enhanced performance and stability, which highlights the perspective for self-powered memories.