react-native icon indicating copy to clipboard operation
react-native copied to clipboard

no simple way to provide executorClass to RCTBridge

Open jwyld opened this issue 11 years ago • 6 comments

The property can be set after -initWithBundleURL:moduleProvider:launchOptions:, but that requires a -reload which can't be performed until the original load from -setUp is finished. That's a lot of latency.

An initial reaction would be to subclass RCTBridge and set the executorClass early. The problem here is that -setUp is called from the designated initializer which means the first safe time to set it is after it's use.

The next reaction would be to override -executorClass. The problem is -setUp directly accesses the ivar instead of using the accessor.

jwyld avatar Apr 24 '15 23:04 jwyld

See issue #288 and PR #652.

ide avatar Apr 24 '15 23:04 ide

We have a solution in mind for this, but it's not really supported at the moment. Using @ide's PR is a good option if you need it right now.

I'm curious why you need it by the way? (just so I can keep track of the real-world requirements for when we do ship a solution).

nicklockwood avatar Apr 24 '15 23:04 nicklockwood

Ah, I'm guessing it relates to this: https://github.com/facebook/react-native/issues/1010

nicklockwood avatar Apr 24 '15 23:04 nicklockwood

Can we close this @nicklockwood, @ide?

brentvatne avatar May 29 '15 21:05 brentvatne

Based upon changes on master (actually in latest release), things are good for my needs.

jwyld avatar May 29 '15 21:05 jwyld

Thanks @jwyld!

brentvatne avatar May 29 '15 21:05 brentvatne