Skip to content
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 access React-Native's jsContext using bridge in v0.45.0-rc.0 #14041

Closed
ayushnawani opened this issue May 18, 2017 · 1 comment
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ayushnawani
Copy link

ayushnawani commented May 18, 2017

Description

I am trying to access react-native's jscontext using RCTBridge in my NativeModule.

In v0.44.0,
i am able to access it using

RCTJSCExecutor  *jscExecutor = [self.bridge valueForKey:@"_javaScriptExecutor"];
JSContext *reactJSContext = [jscExecutor jsContext];

But in v0.45.0-rc.0,
I guess, there is no "_javaScriptExecutor" due to new Bridge implementation.
And jsContext is also removed from RCTBridge's interface.

So, how do i access it?

@ayushnawani
Copy link
Author

Well for now i am able to access it using below code

  id mBridge = self.bridge;
  JSContext *context =  [mBridge jsContext];

@ayushnawani ayushnawani changed the title Unable to access jsContext using bridge in v0.45.0-rc.0 Unable to access React-Native's jsContext using bridge in v0.45.0-rc.0 May 19, 2017
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants