mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use deep require instead of Haste for NativeComponentRegistry
Summary:
Changelog: [Internal]
Some environments that use codegen don't have Haste enabled, breaking the `require('NativeComponentRegistry')` call in generated view configs. Here we change it to reference an explicit path relative to `react-native`.
Reviewed By: JoshuaGross
Differential Revision: D31166063
fbshipit-source-id: cebc23d0d95b5cde76d0f8473eabc03ca82a862e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6ea3df0507
commit
268efb1022
@@ -22,7 +22,7 @@ interface NativeCommands {
|
||||
+scrollTo: (viewRef: React.ElementRef<NativeType>, y: Int32, animated: boolean) => void,
|
||||
}
|
||||
|
||||
const NativeComponentRegistry = require('NativeComponentRegistry');
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
const {
|
||||
dispatchCommand
|
||||
@@ -84,7 +84,7 @@ interface NativeCommands {
|
||||
+scrollTo: (viewRef: React.ElementRef<NativeType>, y: Int32, animated: boolean) => void,
|
||||
}
|
||||
|
||||
const NativeComponentRegistry = require('NativeComponentRegistry');
|
||||
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
|
||||
|
||||
const {
|
||||
dispatchCommand
|
||||
|
||||
Reference in New Issue
Block a user