Skip to content

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

Closed
wants to merge 3 commits into from
Closed

Conversation

Kudo
Copy link
Member

@Kudo Kudo commented Feb 12, 2025

  • 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
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
Member

Choose a reason for hiding this comment

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

same as above

}

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)
get() {
Copy link
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
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
Copy link
Member Author

Kudo commented Feb 12, 2025

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
Copy link
Member Author

Kudo commented Feb 14, 2025

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants