From af8a6a44b2dcaac94bbf8465b66e638a2a98c4a8 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Fri, 21 Aug 2015 15:23:01 -0700 Subject: [PATCH] RN: Expose React.unstable_batchedUpdates Summary: Per @spicyj in facebook/relay#127, this exposes `unstable_batchedUpdates` in React Native the same way it is exposed in `ReactDOM`. --- Libraries/ReactNative/ReactNative.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/ReactNative/ReactNative.js b/Libraries/ReactNative/ReactNative.js index a57bc3b0d..4b09bb667 100644 --- a/Libraries/ReactNative/ReactNative.js +++ b/Libraries/ReactNative/ReactNative.js @@ -21,6 +21,7 @@ var ReactInstanceHandles = require('ReactInstanceHandles'); var ReactNativeDefaultInjection = require('ReactNativeDefaultInjection'); var ReactNativeMount = require('ReactNativeMount'); var ReactPropTypes = require('ReactPropTypes'); +var ReactUpdates = require('ReactUpdates'); var deprecated = require('deprecated'); var findNodeHandle = require('findNodeHandle'); @@ -94,7 +95,11 @@ var ReactNative = { render: render, unmountComponentAtNode: ReactNativeMount.unmountComponentAtNode, - // Hook for JSX spread, don't use this for anything else. + /* eslint-disable camelcase */ + unstable_batchedUpdates: ReactUpdates.batchedUpdates, + /* eslint-enable camelcase */ + + // Hook for JSX spread, don't use this for anything else. __spread: Object.assign, unmountComponentAtNodeAndRemoveContainer: ReactNativeMount.unmountComponentAtNodeAndRemoveContainer,