new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Redux Toolkit · RTK Query · all subjects

refetching & polling

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Query hook options: pollingInterval

The pollingInterval query hook option allows a query to automatically refetch on a provided interval, specified in milliseconds. It defaults to 0 (off).

Query hook options: refetchOnMountOrArgChange

The refetchOnMountOrArgChange query hook option allows forcing the query to always refetch on mount (when true is provided), or allows forcing the query to refetch if enough time (in seconds) has passed since the last query for the same cache (when a number is provided). It defaults to false. This option overrides defaults set in createApi.

Query hook options: refetchOnFocus

The refetchOnFocus query hook option allows forcing the query to refetch when the browser window regains focus. It defaults to false. This option overrides defaults set in createApi.

Query hook options: refetchOnReconnect

The refetchOnReconnect query hook option allows forcing the query to refetch when regaining a network connection. It defaults to false. This option overrides defaults set in createApi.

Force refetch by calling refetch function

To force a refetch and skip the default deduplication behavior, call the refetch function that is returned by the hook.

Give your agent this brain