Summary of multi-end framework Taro problems with React syntax

Taro is a set of multi-end unified development framework created by JD-Bump Lab that follows React grammar specifications.

I have tried it for about 15 days. In general, this is an excellent framework, especially to supplement the current lack of demand on the market for developing small programs with React, so its advantages will not be said much, you can go to it Official view detailed documents

Let me talk about my trial experience below. I hope to help students who use Taro to step on some pits less; because of limited abilities, I may understand and recognize that there are some places that are not in place.

Existing problems

The following are the places that I encountered during the use of Taro that affected the development process or experience:

  1. Does not support source map, debugging can be done through debugger
  2. Aliases are not supported, so there will be large blocks in the project, ../../../which is not conducive to later maintenance
  3. There is no best plan for the needs of the global request. It should app.tsxbe the most suitable place, but Providerany component written in the component's component will be replaced by Taro. I am currently sending a global asynchronous request app.tsxviastore.dispatch(action)
  4. The mapStateToPropssecond parameter of the redux / connect method is missingownProps
  5. When components are nested, there is a difference in the execution order of the life cycle of taro and the life cycle of react. As shown in the order of life cycle execution of Taro, you can see that it componentDidMountis the opposite of React.image description
  6. Cannot use ... Extended operator to pass attributes to components, <Comp {...props} />wrong writing
  7. Attributes cannot be passed into JSX elements, the <Content footer={<View />} />wording is wrong

Outlook

Despite the above problems, I still want to thank the JD front-end team for open source a multi-terminal development framework for React syntax, so that our fans can use React to develop small programs; I have mentioned PR for some of the above problems, such as Q4, and maintenance personnel The PR was soon merged, and the bump team's emphasis on this project and its sense of responsibility can be seen, so I believe that the bump team can definitely improve Taro constantly and cheer!

Guess you like

Origin www.cnblogs.com/baimeishaoxia/p/12698455.html
Recommended