Technology stack
As I am a React technology stack, I choose the framework supporting React syntax to develop small programs. Based on the feedback from online practitioners and ecological synthesis, I decided to adopt TaroJS + TaroUI as the basic framework, and support multi-platform small programs to build the same set of code in the future.
-
TaroJS: taro-docs.jd.com/taro/docs/c…
-
TaroUI:taro-ui.jd.com/#/docs/intr…
-
TaroUI has a complete set of design specifications and plugins that are friendly to both developers and designers
-
Follow the CLI tool of TaroJS to get started quickly and you can build a small program foundation project in 3 minutes. Developers only need to focus on business development
Some concrete pit
I have never had any contact with the development of small programs before, so for me, WHAT I have encountered is not only the pit in the use of business or framework, but also part of the pit in the development process of small programs, so the following are listed from the development process and the use of framework in two aspects
Potholes in applets flow (note)
1. How does the applets development tool switch applets
This in my beginning put me pit enough choke, because the developer tool opened after the project, after opening is directly into the previous open project, at this time there is no switch project interface function button, Google out of the answer are relatively old, not suitable for the new version of the developer tool. In fact, simply close (×) the current project, and the selection screen will appear, as shown below
2. The interface only supports HTTPS, which requires the developer to have the HTTPS domain name
However, you can use the developer tools > Debugger > Mock Tab > Add Mock data to solve the problem.
Update: Another shortcut has been found for the local HTTP protocol interface:
Directly in the development tool to modify the local HTTPS verification can beCopy the code
3. One remaining pitfall regarding developer tools is that the entry to the local configuration agent has not yet been found
This issue is related to the second point above, because if you don’t mock locally and only have HTTP interfaces, there is another way to do this via Charles proxies, but one of the steps is to configure the proxies in the developer tools. I haven’t found it yet. That’s why I mock it, but it doesn’t work…
Charles proxy method connection
You can use the command + shortcut key to bring up the configuration window of the developer tool
Pits in TaroJS and TaroUI
First of all, TaroJS and TaroUI are a really cool development experience, no doubt very fast for a novice like me, but there are inevitably a few hicks, but it doesn’t affect the development and will be updated as the development progresses.
1. The maxLength attribute in AtInput component is invalid in the latest version. The Issue has been mentioned on GitHub for a long time but has not been fixed yet
Note: The latest versions I am currently using are: TaroJS 3.0.26, TaroUI 3.0.0-alpha.3
2. Although the AtForm component is a form component, it does not appear to have form validation. It needs to be implemented with third-party library utilScore
This is community best practice, but not complete for a form component. Here is the address of utilScore.
Taro-ext.jd.com/plugin/view…
3. TaroUI’s official response time is pretty fast, but bug fixes (version updates) seem to be a bit slow
Free open source bike…