What’s New in Taro 1.1? Expanded Mini‑Program Support and UI Library Features

Taro 1.1 introduces Baidu and Alipay mini‑program support, new platform identifiers, UI‑library packaging capabilities, numerous bug fixes and API enhancements across WeChat, H5 and React Native, and opens a beta for mini‑program‑to‑Taro code conversion, with detailed commands and future plans.

Aotu Lab
Aotu Lab
Aotu Lab
What’s New in Taro 1.1? Expanded Mini‑Program Support and UI Library Features

Release Overview

Taro 1.1 was released after more than a month of development, containing over 500 commits and nearly 30 intermediate releases.

New Mini‑Program Platform Support

Baidu Smart Mini‑Program

Full compilation and preview are added for Baidu smart mini‑programs.

npm scripts:

npm run dev:swan
npm run build:swan

Global CLI:

taro build --type swan --watch
taro build --type swan

After building, open Baidu Developer Tools and select the dist directory for preview.

Alipay Mini‑Program

Compilation workflow mirrors Baidu.

npm scripts:

npm run dev:alipay
npm run build:alipay

Global CLI:

taro build --type alipay --watch
taro build --type alipay

After building, open Alipay Mini‑Program Developer Tools and select the dist directory for preview.

Platform Identifiers

Developers can write platform‑specific code using process.env.TARO_ENV, which yields the following values: weapp – WeChat mini‑program h5 – H5 web rn – React Native swan – Baidu smart mini‑program (added in 1.1) alipay – Alipay mini‑program (added in 1.1)

Multi‑Platform UI Library Packaging

The build command now accepts a --ui flag, allowing code that follows a specific convention to be packaged as a reusable UI library usable across all supported platforms. Taro UI, the first cross‑platform UI library, was introduced in version 1.0; version 1.1 expands the packaging capability.

Documentation: https://nervjs.github.io/taro/docs/ui-lib.html

Additional Feature Updates

WeChat Mini‑Program

Bug fix: JSON diff algorithm when calling this.setState.

Bug fix: Nested this.setState callbacks.

New lifecycle componentWillPreload for data pre‑loading.

Support for JSX assignment within the same scope.

Fixes for multi‑level map nesting, Unicode handling, ternary parsing, and string template performance.

H5

Support for sub‑package configuration.

Bug fix: lifecycle execution on background pages.

Bug fix: sending request bodies for PUT/DELETE when the body is an object.

Added setTabBarStyle and setTabBarItem APIs.

Added arrayBufferToBase64 and base64ToArrayBuffer APIs.

Build support for extracting common npm packages into a lib library.

React Native

Added TypeScript support.

Bug fix: less compilation error after project initialization.

Added config.window.navigationStyle configuration.

Added showNavigationBarLoading and hideNavigationBarLoading APIs.

Added arrayBufferToBase64 / base64ToArrayBuffer APIs.

Bug fix: style warning suppression.

Watch mode now compiles code on demand.

Bug fix: style import errors when multiple JS files share a folder.

Made app.json Expo configuration overridable.

Added support for Taro.pxTransform and custom deviceRatio.

Future Plans

The roadmap for upcoming releases is documented at https://github.com/NervJS/taro/blob/master/PLANS.md.

Mini‑Program to Taro Code Conversion (Beta)

The conversion tool is complete and in internal testing. Install the canary version to try it: npm i -g @tarojs/cli@canary Feedback can be submitted via the issue tracker: https://github.com/NervJS/taro/issues/955

References

Full changelog: https://github.com/NervJS/taro/blob/master/CHANGELOG.md

Official repository: https://github.com/NervJS/taro

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

multi-platformTaroUI librarymini-program
Aotu Lab
Written by

Aotu Lab

Aotu Lab, founded in October 2015, is a front-end engineering team serving multi-platform products. The articles in this public account are intended to share and discuss technology, reflecting only the personal views of Aotu Lab members and not the official stance of JD.com Technology.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.