Frontend Development 4 min read

Rax 1.0: Faster Bundles, Hooks, and Alipay Mini‑Program Support

Rax 1.0 introduces a major version upgrade with Hooks, Alipay mini‑program support, a dramatically reduced bundle size, improved web experience and server‑side rendering, while providing richer documentation, plugin architecture, and a new website to boost development efficiency.

Taobao Frontend Technology
Taobao Frontend Technology
Taobao Frontend Technology
Rax 1.0: Faster Bundles, Hooks, and Alipay Mini‑Program Support

Some Data

As of late September 2019, Rax released a major version update that added Hooks‑style coding, supported Alipay mini‑programs, and delivered a significant boost in web project experience.

4919 commits

1076 pull requests

309 issues

5451 stars

User Experience

Rax 1.0 makes a breakthrough in web experience with a smaller package size, better performance, and server‑side rendering that makes page loading and preview smoother.

The core bundle is nearly half the size of Rax 0.6.5, and the new Hooks API further reduces code size. Core components can now be imported on demand for greater flexibility.

Development Efficiency

Rax 1.0 adds support for Alipay mini‑programs, compiled from JSX at build time.

The official "Go Rax" project showcases Rax components and APIs and can be previewed on the website.

Its plugin‑based architecture allows flexible adaptation to various business needs.

The new website offers richer content, smarter workflows, and more standardized design.

Development Standards

Initialize a project with:

<code>npm init rax &lt;YourProjectName&gt;</code>

Unlike version 0.6, Rax 1.0 requires specifying a driver.

Hooks, a new feature in Rax 1.0, enable function components to use state and lifecycle methods, following the React Hooks specification.

Some non‑core APIs have been removed from Rax Core and are provided as separate packages.

Example import:

<code>import findDOMNode from 'rax-find-dom-node';</code>

Rax supports an extended JSX syntax called JSX+, which adds directive‑style enhancements to standard JSX.

Components are conceptually similar to JavaScript functions: they receive props and return a renderable Rax element.

Event handling mirrors HTML DOM events but uses camelCase naming and function handlers instead of strings.

Events use camelCase naming.

Pass functions as event handlers, not strings.

Rax supports inline styles and separate CSS files; the

rpx

unit is recommended for multi‑platform development.

Style support varies across platforms; be aware of differences.

APIs differ between platforms; understand each platform’s capabilities.

Future Plans

frontend developmentSSRweb performanceHooksRaxAlipay mini program
Taobao Frontend Technology
Written by

Taobao Frontend Technology

The frontend landscape is constantly evolving, with rapid innovations across familiar languages. Like us, your understanding of the frontend is continually refreshed. Join us on Taobao, a vibrant, all‑encompassing platform, to uncover limitless potential.

0 followers
Reader feedback

How this landed with the community

login 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.