Skip to content

Commit

Permalink
tweak note about status flags
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Dec 8, 2023
1 parent c3ce98d commit 61c54b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rtk-query/usage/usage-without-react-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ With React hooks, this behaviour is instead handled within [`useQuery`](../api/c

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

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.
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.

### Memoization

Expand Down

0 comments on commit 61c54b2

Please sign in to comment.