Renamed component.toTemplate() to factory().