> For the complete documentation index, see [llms.txt](https://bryan-guner.gitbook.io/my-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bryan-guner.gitbook.io/my-docs/redux/repos/redux-toolkit/docs/rtk-query/usage/conditional-fetching.md).

# Conditional Fetching

&#x20;

## Conditional Fetching

### Overview

Query hooks automatically begin fetching data as soon as the component is mounted. But, there are use cases where you may want to delay fetching data until some condition becomes true. RTK Query supports conditional fetching to enable that behavior.

If you want to prevent a query from automatically running, you can use the `skip` parameter in a hook.

[examples](docblock://query/react/buildHooks.ts?token=UseQuerySubscriptionOptions.skip)

[remarks](docblock://query/react/buildHooks.ts?token=UseQuerySubscriptionOptions.skip)

:::tip Typescript users may wish to use [`skipToken`](/my-docs/redux/repos/redux-toolkit/docs/rtk-query/api/created-api/hooks.md#skiptoken) as an alternative to the `skip` option in order to skip running a query, while still keeping types for the endpoint accurate. :::

### Conditional Fetching Example
