Dendrimer-mediated formation of multicomponent nanospheres