Here to record the technical points encountered in the work, as well as some of their own thoughts on life, published on Wednesday or Friday.
cover
The Taro framework of JD.com
Member of the Six Otter brothers, crown prince of the Kingdom of Light.
Taro and Taro – the Ui
Taro is a cross-end development framework of JD.com, with very powerful functions, supporting React/Vue/Nerv for small programs, H5, and even RN applications.
And named after Taro, it shows its ambition is not small. From this perspective, you might want to get excited about getting your user production environment into development as soon as possible.
Taro-UI is a multi-terminal UI component developed based on the Taro framework. It supports applets and H5, but does not adapt to ReactNative.
I have been using these two frameworks for nearly a year of development. From my personal experience, I think if I develop small programs or H5 business in the future, I will resolutely give up this framework, because it has a lot of pits, especially when developing enterprise wechat.
Taro and taro-UI into the pit to the abandoned pit
I first used Taro in 2019, when THERE was a very simple program with only three or four interfaces. At that time, I was watching Taro. At that time, I was using version 1.0.
The rest of his work has little to do with Taro. However, at the beginning of this year, due to the need for multi-stage development in the project, I have been using Taro and taro-UI for development, involving two projects. One is that the project needs to be packaged into small program and H5 at the same time, and the other is the development of enterprise wechat application.
Packaged into applets and H5 at the same time this project we’ll call client development. The development experience on the client side generally feels ok, with fewer potholes to tread, because there are some problems we can think of in advance. Such as:
- Operating environment judgment
- Login traffic control
- Similarities and differences in system permission apis
- Project Release process
- Debug mode
And so on, because in the client development of the time to deal with these problems at the same time, so it did not encounter any more difficult to solve the problem. Even feel that they have quite confident about this framework, until the switch to the development of the enterprise wechat, only to find that it is too naive, all kinds of problems let head big.
The development process of enterprise wechat application is consistent with that of wechat public account. But the enterprise wechat development experience is simply terrible.
This is bad in two ways:
One is the project release process. Each change requires a test release or pre-release environment for validation, and a minute or two is acceptable if the time between package and successful project release is very short. Unfortunately, our CI process takes more than 5 minutes per release and is extremely unstable. One minute you’re releasing a project, and all of a sudden your app is offline. This offline process can take half a day or even a day to fix.
Second, taro-UI has serious compatibility problems with the built-in browser of enterprise wechat PC application and mobile application. Because the PC side of the enterprise wechat built-in browser similar to our PC Google kernel. The mobile enterprise wechat built-in browsing kernel should be wechat X5 kernel. Therefore, the same input box in the enterprise wechat application, PC and mobile phone performance is completely different. An input box, local PC browser debugging, H5 mode is completely normal, but once switched back to the normal web mode, completely useless.
The components involved are:
- AtInput
- AtInputNumber
Also, properties that are documented are not necessarily useful. Such as:
- The AtInput
maxLength
Properties.
From using Taor for client development to using Taro for enterprise wechat development, my attitude changed from full of confidence to wanting to give up immediately.
Is it a distortion of human nature? Or moral decay?
Taro-ui component, according to its style, is equivalent to secondary encapsulation based on WEUI, and then supports compilation into small program UI and H5. However, for the compatibility of enterprise wechat, it still needs to be further improved.
conclusion
So the final conclusion is, if your project does not involve enterprise wechat development, then you can use Taro and taro-UI, because these holes are small holes.
But if the development of the project is the enterprise wechat application, it is best to choose what UI framework, at least the ENTERPRISE wechat PC and mobile phone UI can keep consistent.
In fact, most of the projects developed by Taro are JD’s internal projects, and most of the projects have little to do with enterprise wechat. Taro is not good enough for me anymore.
Taro based multi-terminal (small program +H5) development practice
Previously summarized:
Taro based multi-terminal (small program +H5) development practice
The last
- Move your rich little hands and “like it.”
- Move your rich little hands, “click here”
- All see here, might as well “add a follow”
- Might as well “forward”, good things to remember to share