Skip to content

Commit 61c54b2

Browse files
committed
tweak note about status flags
1 parent c3ce98d commit 61c54b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/rtk-query/usage/usage-without-react-hooks.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ With React hooks, this behaviour is instead handled within [`useQuery`](../api/c
5959

6060
```ts title="Accessing cached data & request status" no-transpile
6161
const result = api.endpoints.getPosts.select()(state)
62-
const { data, status, error } = result
62+
const { data, isSuccess, isError, error } = result
6363
```
6464

65-
Note that unlike the auto-generated query hooks, derived booleans such as `isLoading`, `isFetching`, `isSuccess` are not available here. The raw `status` enum is provided instead.
65+
Note that unlike with the auto-generated hooks, there is no `isFetching` flag, and the `isLoading` flag will be true if the status is pending, regardless of if there is already data.
6666

6767
### Memoization
6868

0 commit comments

Comments
 (0)