How to undo creation of component in array

I’ve created my own editor mode and implemented undo/redo. I have an actor that has a tarray of ucomponents. I can successfully destroy a component from the tarray, and then undo and it gets created again. But I can’t create a component and then undo and it gets destroyed. Any tips?