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.

相关推荐
灵析表格5 分钟前
灵析表格功能函数深度分析报告
前端·数据库·microsoft
breeze jiang11 分钟前
React useRef + Web Worker:避免大计算阻塞页面的通信方案
前端·javascript·react.js
fthux21 分钟前
MCP协议开发实战:从零搭建AI Agent工具链
前端·人工智能·ai·开源·github
codeGoogle9 小时前
自研 IM 还是选择第三方 SDK?企业开发者应该如何权衡?
前端·后端·程序员
用户9385156350711 小时前
React Context 与自定义 Hook 从底层到实践:「跨层级通信 + 副作用封装」全解析
前端·javascript·react.js
滴滴答答哒11 小时前
VUE3+element-plus MultiSelect 多选下拉组件
前端·javascript·vue.js
其美杰布-富贵-李11 小时前
04 watch 与 Vue 响应式数据流
前端·javascript·vue.js
赵大仁13 小时前
生成式 UI 实战:用 JSON Schema + React 动态渲染 AI 界面
前端·ai·react·next.js·前端架构·生成式ui
kyriewen14 小时前
我排查了一个React内存泄漏——罪魁祸首是这3个被忽略的清理函数
前端·javascript·面试