mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-11 02:30:41 +08:00
TM: trimming down module dependencies when getting NativeModules
Summary: For now, do `require('NativeModules')` instead of `import {NativeModules} from 'react-native'`.
Reviewed By: mdvacca
Differential Revision: D13934066
fbshipit-source-id: 5188b11428a4dca8cecd1934e593d89a6e3fde2e
This commit is contained in:
committed by
Facebook Github Bot
parent
05f35c296d
commit
1bbb69355c
@@ -10,9 +10,10 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const NativeModules = require('NativeModules');
|
||||
|
||||
import type {TurboModule} from 'RCTExport';
|
||||
import invariant from 'invariant';
|
||||
import {NativeModules} from 'react-native';
|
||||
|
||||
// TODO
|
||||
function get<T: TurboModule>(name: string): ?T {
|
||||
|
||||
Reference in New Issue
Block a user