-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Unable to get reactContext in MainActivity.kt #47647
Comments
Warning Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:
|
|
Summary: Fixes facebook#47647 There's no convenient way to access the current react context when using the new architecture. Exposing `getCurrentReactContext` allows for users to migrate without forcing the check downstream. Changelog: [Android][Added] ReactDelegate and ReactActivityDelegate#getCurrentReactContext can be used to access the current context Differential Revision: D66094540
okay |
Is there any way to get reactContext in MainActivity.kt in 0.76.6? |
…ported under new react architecture: facebook/react-native#47647 (comment)
@saikrishnanamburi @chenvvy you can get the |
Description
val reactContext: ReactContext? = this.reactNativeHost.reactInstanceManager.currentReactContext
ReactContext: null
Steps to reproduce
npm start
React Native Version
0.76.2
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
.
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: