taro编译报错this._create****** is not a function;[component] Property Observer Error @*****

The following error message, just learning taro because many do not know, so grow it in error.

 

js code is written

Briefly talk about being given the reasons for it, first of all it is a kind of functional definition of the components method, a file can not be defined because the two components, but sometimes we need to abstract components of the internal components, then the class functional components that you want to answer .

But such wording, there are some limitations:

  1. Naming function must  render begin with, render the first letter capitalized after
  2. Function parameters not passed in JSX element or element reference JSX
  3. Function can not call itself recursively.

So into the beginning of the render, such as this

You can of

Guess you like

Origin www.cnblogs.com/qianyy/p/11276040.html