Skip to content

chore: integrate jsc into example on android#3

Closed
Kudo wants to merge 3 commits into
mainfrom
@kudo/android-2
Closed

chore: integrate jsc into example on android#3
Kudo wants to merge 3 commits into
mainfrom
@kudo/android-2

Conversation

@Kudo

@Kudo Kudo commented Feb 12, 2025

Copy link
Copy Markdown
Member
  • add react-native.config.js for autolinking
  • [old arch] overwrites MainApplication.getJavaScriptExecutorFactory() to use JSCExecutorFactory
  • [new arch] create a JSCReactHost basically from the DefaultReactHost but replace with JSCRuntimeFactory
* @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?

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment thread example/android/app/src/main/java/com/jscexample/MainApplication.kt Outdated

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
get() {

Copy link
Copy Markdown
Member

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)
Comment on lines +26 to +30
* 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.

Copy link
Copy Markdown
Member

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>
@Kudo

Kudo commented Feb 12, 2025

Copy link
Copy Markdown
Member Author

i'm lean toward to land #4 than this pr and we don't have to maintain a JSCReactHost.

Base automatically changed from @kudo/android-1 to main February 13, 2025 08:13
@Kudo

Kudo commented Feb 14, 2025

Copy link
Copy Markdown
Member Author

closing this in favor of #4

@Kudo Kudo closed this Feb 14, 2025
@Kudo Kudo deleted the @kudo/android-2 branch February 14, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants