-
Notifications
You must be signed in to change notification settings - Fork 5
chore: integrate jsc into example on android #3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
* @param exceptionHandler Callback that can be used by React Native host applications to react to | ||
* exceptions thrown by the internals of React Native. | ||
* | ||
* TODO(T186951312): Should this be @UnstableReactNativeAPI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this @Kudo ?
exceptionHandler = exceptionHandler) | ||
val componentFactory = ComponentFactory() | ||
DefaultComponentsRegistry.register(componentFactory) | ||
// TODO: T164788699 find alternative of accessing ReactHostImpl for initialising reactHost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
example/android/app/src/main/java/com/jscexample/MainApplication.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
override val reactHost: ReactHost | ||
get() = getDefaultReactHost(applicationContext, reactNativeHost) | ||
get() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a util function like this one?
get() = getDefaultJscReactHost(applicationContext, reactNativeHost)
* A utility class that allows you to simplify the setup of a [ReactHost] for new apps in Open | ||
* Source. | ||
* | ||
* [ReactHost] is an interface responsible of handling the lifecycle of a React Native app when | ||
* running in bridgeless mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is stale now
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
i'm lean toward to land #4 than this pr and we don't have to maintain a JSCReactHost. |
closing this in favor of #4 |
react-native.config.js
for autolinkingMainApplication.getJavaScriptExecutorFactory()
to useJSCExecutorFactory
JSCReactHost
basically from the DefaultReactHost but replace withJSCRuntimeFactory