query icon indicating copy to clipboard operation
query copied to clipboard

remove unstable_batchedUpdates

Open TkDodo opened this issue 3 years ago • 0 comments

context

we currently use unstable_batchedUpdates as our batchNotifyFn in React and React Native:

https://github.com/TanStack/query/blob/357ec041a6fcc4a550f3df02c12ecc7bcdefbc05/packages/react-query/src/setBatchUpdatesFn.ts#L4

Apparently, this function is a "noop" in React18, as discussed here:

https://github.com/facebook/react/issues/24831#issuecomment-1296944806

proposal

  • remove the default side-effect that sets batchedUpdates
  • keep the option to set a batchUpdatesFn via the notifyManager
  • this would also mean we would be completely side-effect free:

https://github.com/TanStack/query/blob/9b21609350d9ad41faf5c2fb0ac6c67e4324a637/packages/react-query/package.json#L24-L26

TkDodo avatar Dec 23 '22 07:12 TkDodo