Tag

Component Conversion

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 16, 2024 · Frontend Development

Rax2Taro: Building a Compiler to Convert Rax Components into Taro

This article walks through the design and implementation of a compiler that automatically transforms Rax components into Taro components, covering the background, Babel‑based AST processing, import rewriting, component attribute mapping, project structure, automated end‑to‑end testing, and future enhancements.

ASTBabelComponent Conversion
0 likes · 15 min read
Rax2Taro: Building a Compiler to Convert Rax Components into Taro
Xianyu Technology
Xianyu Technology
Mar 20, 2019 · Frontend Development

Vue to React Component Conversion Using Babel AST

The article describes a pipeline that converts a Vue component into a React component by parsing the template, script and style with vue‑template‑compiler and Babel, traversing the AST to map Vue data, props, computed, methods and lifecycle hooks to React state, defaultProps and lifecycle methods, and generating JSX from directives such as v‑if, v‑for and event bindings, thereby reducing rewrite effort and supporting targets.

ASTBabelComponent Conversion
0 likes · 12 min read
Vue to React Component Conversion Using Babel AST