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

[React Native] Inline calls to FabricUIManager in shared code #15490

Merged
merged 5 commits into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/react-native-renderer/src/NativeMethodsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type {
import invariant from 'shared/invariant';
// Modules provided by RN:
import TextInputState from 'TextInputState';
import * as FabricUIManager from 'FabricUIManager';
import UIManager from 'UIManager';

import {create} from './ReactNativeAttributePayload';
Expand Down Expand Up @@ -86,7 +85,8 @@ export default function(
}

if (maybeInstance.canonical) {
FabricUIManager.measure(
// Must be inlined to avoid loading this before Fabric is set up
require('FabricUIManager').measure(
maybeInstance.node,
mountSafeCallback_NOT_REALLY_SAFE(this, callback),
);
Expand Down Expand Up @@ -131,7 +131,7 @@ export default function(
}

if (maybeInstance.canonical) {
FabricUIManager.measureInWindow(
require('FabricUIManager').measureInWindow(
maybeInstance.node,
mountSafeCallback_NOT_REALLY_SAFE(this, callback),
);
Expand Down
7 changes: 4 additions & 3 deletions packages/react-native-renderer/src/ReactNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import type {
import React from 'react';
// Modules provided by RN:
import TextInputState from 'TextInputState';
import * as FabricUIManager from 'FabricUIManager';
import UIManager from 'UIManager';

import {create} from './ReactNativeAttributePayload';
Expand Down Expand Up @@ -101,7 +100,8 @@ export default function(
}

if (maybeInstance.canonical) {
FabricUIManager.measure(
// Must be inlined to avoid loading this before Fabric is set up
require('FabricUIManager').measure(
maybeInstance.node,
mountSafeCallback_NOT_REALLY_SAFE(this, callback),
);
Expand Down Expand Up @@ -144,7 +144,8 @@ export default function(
}

if (maybeInstance.canonical) {
FabricUIManager.measureInWindow(
// Must be inlined to avoid loading this before Fabric is set up
require('FabricUIManager').measureInWindow(
maybeInstance.node,
mountSafeCallback_NOT_REALLY_SAFE(this, callback),
);
Expand Down