-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support lazy/turbo packages #356
Comments
Here's what the generated code should look like: https://gist.github.com/janicduplessis/6256d4bda0a59dd345654dacae106ea2. Also this confirms that the approach of using a single Instead of adding a package per module we should add all native modules and view managers from each linked library to a single |
@janicduplessis thank you for sharing that gist! From the twitter thread regarding using
Can you explain how you did this with gradle? |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
Describe the Feature
As described by Ram in his article, Android can greatly benefit from using
LazyReactPackage
orTurboReactPackage
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 theMainApplication.java
changes to include only oneTurboReactPackage
with all native modules in it.The text was updated successfully, but these errors were encountered: