Skip to content
Starknet Start

useInvalidateOnBlock

Invalidate the given query on every new block.

Usage

import {  } from "@starknetfoundation/starknet-start-react";
 
({ : ["somekey"] });

Arguments

enabled

  • Type: boolean | undefined

Enable or disable the query from automatically running. true by default

queryKey

  • Type: QueryKey

Type from @tanstack/react-query

refetchInterval

  • Type: number | undefined

How often to poll the current block number, in milliseconds. Defaults to 5000.