Single-crystal-to-single-crystal transformation from 1 D staggered-sculls chains to 3 D NbO-type metal-organic framework through [2+2] photodimerization.