Compose 从 View 系统迁移

From Views to Compose: Where can I start?

迁移基于 View 的现有应用

在团队中使用 Compose

已有一个使用 View 构建的现有应用?了解如何采用增量方式进行迁移。

1. Migration Strategy

2. Adopt Compose in new features

New Feature in a New Screen

New Feature in an Existing Screen

3. Create a module of common UI components

buttons, app bars, chips, and so on.

dialogs, cards, and so on.

4. Incrementally migrate existing features one screen at a time

Rely on UI testing to prevent regressions.

5. Fragments

Once all the contents are in Compose.

Remove Fragments and replace them with a corresponding screen level composable.

Use Navigation Compose to navigate and pass data between these screen-level composables.

相关推荐
WebInfra3 小时前
Rspack 2.1 发布:React Compiler 提速 10 倍!
前端
李明卫杭州3 小时前
CSS 媒体查询详解:一文掌握响应式设计的核心技术
前端
lichenyang4534 小时前
从 H5 按钮到 OpenHarmony 能力调用:我如何理解 ASCF 的运行链路
前端
下家4 小时前
我放弃了 Vue/React,选择自研框架
前端·前端框架
Asize5 小时前
HTML5 Canvas 基础:从按帧动画到 ECharts 数据可视化
前端·javascript·canvas
默_笙5 小时前
🎄 后端给我一堆扁平数据,我 10 行代码把它变成了树
前端·javascript
Mahut5 小时前
我用 Electron + FFmpeg 做了一个本地视频处理工作站 ClipForge
前端·ffmpeg·electron
前端Hardy5 小时前
又一个 AI 神器火了!
前端·javascript·后端
锋行天下5 小时前
我试图优化 Vite 的拆包,结果首屏慢了 10 倍
前端·vue.js·架构
PBitW5 小时前
GPT训练我的第二天,我表示不过如此!!!😕😕😕
前端·javascript·面试