mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 05:15:49 +08:00
[react-packager][streamline oss] Move open sourced JS source to react-native-github
This commit is contained in:
18
Libraries/Components/Touchable/ensureComponentIsNative.js
Normal file
18
Libraries/Components/Touchable/ensureComponentIsNative.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright 2004-present Facebook. All Rights Reserved.
|
||||
*
|
||||
* @providesModule ensureComponentIsNative
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
var invariant = require('invariant');
|
||||
|
||||
var ensureComponentIsNative = function(component) {
|
||||
invariant(
|
||||
component && typeof component.setNativeProps === 'function',
|
||||
'Touchable child must either be native or forward setNativeProps to a ' +
|
||||
'native component'
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = ensureComponentIsNative;
|
||||
Reference in New Issue
Block a user