Metal complexes of formula I and IA and polymers derived from the complexes are useful in optoelectronic devices