Add shim files for RN in npm package
Ben Alpert committed
Dec 29, 2015 at 12:13 UTC
c29642d6edbc80188d2f21d3395276e1c1989d0a
2 files changed
+17
packages/react/lib/React.native.js
new
+5
@@ -0,0 +1,5 @@
1
+'use strict';
2
+
3
+// TODO: Once we remove the DOM bits from React, this shim can go away.
4
+
5
+module.exports = require('./ReactIsomorphic');
packages/react/lib/ReactDOM.native.js
new
+12
@@ -0,0 +1,12 @@
1
+'use strict';
2
+
3
+var ReactUpdates = require('./ReactUpdates');
4
+
5
+// TODO: In React Native, ReactTestUtils depends on ./ReactDOM (for
6
+// renderIntoDocument, which should never be called) and Relay depends on
7
+// react-dom (for batching). Once those are fixed, nothing in RN should import
8
+// this module and this file can go away.
9
+
10
+module.exports = {
11
+ unstable_batchedUpdates: ReactUpdates.batchedUpdates,
12
+};