query
query copied to clipboard
remove unstable_batchedUpdates
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