Skip to content

Commit 7c90bfd

Browse files
committed
Add note on selectFromResult
1 parent 5dd5934 commit 7c90bfd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/toolkit/src/query/react/buildHooks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,7 @@ export type UseInfiniteQueryStateOptions<
11171117
* `selectFromResult` allows you to get a specific segment from a query result in a performant manner.
11181118
* When using this feature, the component will not rerender unless the underlying data of the selected item has changed.
11191119
* If the selected item is one element in a larger collection, it will disregard changes to elements in the same collection.
1120+
* Note that this should always return an object (not a primitive), as RTKQ adds fields to the return value.
11201121
*
11211122
* @example
11221123
* ```ts

0 commit comments

Comments
 (0)