react-native-community / react-native-community/cli
Support lazy/turbo packages
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 949
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked article and the react-native config implementation that generates MainApplication.java. Trace how native modules are currently wrapped, then determine how one TurboReactPackage and module annotations should preserve backward compatibility. Done means generated Android projects use the lazy/turbo package without breaking modules that lack annotations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, react-native, typescript
- Domain
- mobile, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100