mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 02:42:05 +00:00
[add] NativeModules shim
The `NativeModules` namespace is import by some libraries, which will throw an error if missing. Close #86
This commit is contained in:
committed by
Nicolas Gallagher
parent
06d8614519
commit
651d519500
@@ -29,6 +29,9 @@ import TextInput from './components/TextInput'
|
|||||||
import Touchable from './components/Touchable'
|
import Touchable from './components/Touchable'
|
||||||
import View from './components/View'
|
import View from './components/View'
|
||||||
|
|
||||||
|
// modules
|
||||||
|
import NativeModules from './modules/NativeModules'
|
||||||
|
|
||||||
const ReactNative = {
|
const ReactNative = {
|
||||||
// apis
|
// apis
|
||||||
Animated,
|
Animated,
|
||||||
@@ -58,6 +61,9 @@ const ReactNative = {
|
|||||||
TouchableWithoutFeedback: Touchable,
|
TouchableWithoutFeedback: Touchable,
|
||||||
View,
|
View,
|
||||||
|
|
||||||
|
// modules
|
||||||
|
NativeModules,
|
||||||
|
|
||||||
// React
|
// React
|
||||||
...React,
|
...React,
|
||||||
...ReactDOM,
|
...ReactDOM,
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
// NativeModules shim
|
||||||
|
const NativeModules = {}
|
||||||
|
export default NativeModules
|
||||||
Reference in New Issue
Block a user