Support lazy/turbo packages

未关闭
#356 3 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
30/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
java, react-native, typescript
领域
mobile, tooling

调研方向

首先阅读链接的文章以及生成 MainApplication.java 的 react-native 配置实现。跟踪当前原生模块的封装方式,然后确定一个 TurboReactPackage 和模块注解应如何保持向后兼容。完成的标准是:生成的 Android 项目使用 lazy/turbo package,同时不会破坏缺少注解的模块。

由索引模型根据 Issue 内容生成。

描述

feature request no-stale-bot

Describe the Feature

As described by Ram in his article, Android can greatly benefit from using LazyReactPackage or TurboReactPackage to decrease startup time.

It requires adding annotations to native modules themselves but is also backwards compatible in the sense that if annotation is missing, the module still gets loaded, only not lazily.

From performance perspective, it's also better not to wrap every module in its own package - instead of nesting them, we can only have one package to wrap all native modules.

Possible Implementations

As part of the work on react-native config, we could update the MainApplication.java changes to include only one TurboReactPackage with all native modules in it.

主要语言
TypeScript
星标
2.9k
派生
949
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react-native-community/cli 的其他 Issue

查看 react-native-community/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。