Simpler api for component factory