mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix(iOS): use getNextRootViewTag() on new architecture (#51522)
Summary: Sometime ago Fabric specific root view tag allocator was added to the codebase: https://github.com/facebook/react-native/commit/7dec625ecabdc23cbae37e0034d29bb7bff17755 This PR makes sure to use it on iOS. It removes the need for additional conversions. ## Changelog: [INTERNAL] [CHANGED] - use getNextRootViewTag() on new architecture Pull Request resolved: https://github.com/facebook/react-native/pull/51522 Test Plan: CI Green Reviewed By: javache Differential Revision: D75204499 Pulled By: rshest fbshipit-source-id: 12927887ae229c9fe89fa680f2bd55b5e378f9ae
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d42d46306a
commit
50ec74e2d5
@@ -21,6 +21,7 @@
|
||||
#import <React/RCTSurfaceView.h>
|
||||
#import <React/RCTUIManagerUtils.h>
|
||||
#import <React/RCTUtils.h>
|
||||
#import <react/renderer/core/ReactRootViewTagGenerator.h>
|
||||
#import <react/renderer/mounting/MountingCoordinator.h>
|
||||
#import <react/utils/FollyConvert.h>
|
||||
|
||||
@@ -56,8 +57,7 @@ using namespace facebook::react;
|
||||
if (self = [super init]) {
|
||||
_surfacePresenter = surfacePresenter;
|
||||
|
||||
_surfaceHandler =
|
||||
SurfaceHandler{RCTStringFromNSString(moduleName), (SurfaceId)[RCTAllocateRootViewTag() integerValue]};
|
||||
_surfaceHandler = SurfaceHandler{RCTStringFromNSString(moduleName), getNextRootViewTag()};
|
||||
_surfaceHandler->setProps(convertIdToFollyDynamic(initialProperties));
|
||||
|
||||
[_surfacePresenter registerSurface:self];
|
||||
|
||||
Reference in New Issue
Block a user