Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ module.exports = {
get UIManager() {
return require('./Libraries/ReactNative/UIManager').default;
},
/**
* @deprecated Since 0.86, `unstable_batchedUpdates` is a no-op that synchronously invokes the callback. React batches updates automatically, so call the callback directly instead.
*/
unstable_batchedUpdates<T>(fn: (bookkeeping: T) => void, bookkeeping: T) {
fn(bookkeeping);
},
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ export * as Systrace from './Libraries/Performance/Systrace';
export {default as ToastAndroid} from './Libraries/Components/ToastAndroid/ToastAndroid';
export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
export {default as UIManager} from './Libraries/ReactNative/UIManager';
/**
* @deprecated Since 0.86, `unstable_batchedUpdates` is a no-op that synchronously invokes the callback. React batches updates automatically, so call the callback directly instead.
*/
export function unstable_batchedUpdates<T>(
fn: (bookkeeping: T) => void,
bookkeeping: T,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export interface GestureResponderHandlers {
}

/**
* React Native also implements unstable_batchedUpdates
* @deprecated Since 0.86, `unstable_batchedUpdates` is a no-op that synchronously invokes the callback. React batches updates automatically, so call the callback directly instead.
*/
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
/**
* @deprecated Since 0.86, `unstable_batchedUpdates` is a no-op that synchronously invokes the callback. React batches updates automatically, so call the callback directly instead.
*/
export function unstable_batchedUpdates<R>(callback: () => R): R;
Loading