code: func NewComponent(
  	vmCreator func() (structPtr interface{}),
  	templateStr string,
  	replaceMountPoint ...bool,
  ) *Component {
  	// args
  	idx := len(creatorPool)
  	creatorPool = append(creatorPool, new(pool))
  	creatorPool[idx].creator = vmCreator
  	vmfn := func() interface{} {
  		p := creatorPool[idx]
  		if p.counter%3 == 0 {
  			p.structPtr = p.creator()
  		}
  		p.counter += 1
  		return p.structPtr
  	}
  	// opts
  	opt := NewOption()
  	opt.Data = vmfn
  	opt.Template = templateStr
  	opt.OnLifeCycleEvent(EvtBeforeCreate, func(vm *ViewModel) {
  		vm.Options.Set("methods", js.MakeWrapper(vmfn()))
  		vMap[vmfn()] = vm
  	})
  	return opt.NewComponent()
  }
docs: // NewComponent creates and registers a named global Component
  //
  //  vmCreator should return a gopherjs struct pointer. see New for more details