mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update the template to load the correct JS engine at runtime. (#35095)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35095 This change will make sure that we load the correct JS engine at runtime, by using the BuildConfig flag that RNGP sets for us. This will solve a lot of noise in adb logcat for users seeing stacktraces mentioning failing to load `jscexecutor` library. This is also a breaking change, but as the API was not widely used nor advertised in the template, we should be fine by just mentioning this in the release notes. Changelog: [Android] [Changed] - Update the template to load the correct JS engine at runtime Reviewed By: cipolleschi Differential Revision: D40710597 fbshipit-source-id: d59a7a52b22a9bf273ea89094c6620c3ecf6eb00
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3f77736e15
commit
2097278d2a
@@ -190,4 +190,12 @@ public abstract class ReactNativeHost {
|
||||
* default ones, you'll want to include more packages here.
|
||||
*/
|
||||
protected abstract List<ReactPackage> getPackages();
|
||||
|
||||
/**
|
||||
* Returns the {@link JSEngineResolutionAlgorithm} to be used when loading the JS engine. If null,
|
||||
* will try to load JSC first and fallback to Hermes if JSC is not available.
|
||||
*/
|
||||
protected @Nullable JSEngineResolutionAlgorithm getJSEngineResolutionAlgorithm() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user