Skip to content

Commit

Permalink
Re-enable event loop in OSS (#44788)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44788

We disabled the event loop in RN on the main branch after we found some issues in the implementation. Those have been resolved already so we can re-enable it again.

For context, it's already enabled in the latest branch so this is just for main.

Changelog: [internal]

Reviewed By: cortinico

Differential Revision: D58146393

fbshipit-source-id: ab908ecbd507d7087137a36cad5cc917eb7b1311
  • Loading branch information
rubennorte authored and facebook-github-bot committed Jun 4, 2024
1 parent 627cdd5 commit 2d9e54b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
16 changes: 15 additions & 1 deletion packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,21 @@ - (RCTRootViewFactory *)createRCTRootViewFactory

#pragma mark - Feature Flags

class RCTAppDelegateBridgelessFeatureFlags : public facebook::react::ReactNativeFeatureFlagsDefaults {};
class RCTAppDelegateBridgelessFeatureFlags : public facebook::react::ReactNativeFeatureFlagsDefaults {
public:
bool useModernRuntimeScheduler() override
{
return true;
}
bool enableMicrotasks() override
{
return true;
}
bool batchRenderingUpdatesInEventLoop() override
{
return true;
}
};

- (void)_setUpFeatureFlags
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ public object DefaultNewArchitectureEntryPoint {
if (bridgelessEnabled) {
ReactNativeFeatureFlags.override(
object : ReactNativeFeatureFlagsDefaults() {
override fun useNativeViewConfigsInBridgelessMode(): Boolean = fabricEnabled
override fun useModernRuntimeScheduler(): Boolean = true

override fun enableMicrotasks(): Boolean = true

override fun batchRenderingUpdatesInEventLoop(): Boolean = true

override fun useNativeViewConfigsInBridgelessMode(): Boolean = true
})
}

Expand Down

0 comments on commit 2d9e54b

Please sign in to comment.