Skip to content

Release v21.17.1

Choose a tag to compare

@github-actions github-actions released this 16 Aug 07:17
dc952c9

Summary

useObservableQuery/useObservableQueryWithPaging could silently keep observing a stale query subscription instead of switching when a call site's args changed shape between renders (e.g. undefined{ someKey: value }), because React only compares the overlapping prefix of a useMemo/useEffect dependency array when its length changes between renders.

Fixed

  • useObservableQuery and useObservableQueryWithPaging now always establish a fresh subscription when a query's arguments change, even when the argument object's key count changes between renders (e.g. going from no arguments to an object, or back) (#2551)