Skip to main content

@reactive-dot/react

Functions

FunctionDescription
useLazyLoadQueryWithRefreshHook for querying data from chain, returning the response & a refresher function.

Components

FunctionDescription
AwaitComponent for awaiting a promise and rendering its result.
QueryRendererComponent for rendering the result of a query.

Contexts

FunctionDescription
ChainProviderReact context provider for scoping to a specific chain.
QueryOptionsProviderReact context to control subscription options.
ReactiveDotProviderReact context provider for ReactiveDOT.
SignerProviderReact context provider to assign a default signer.

Hooks

NameDescription
useMutationEffect-
usePromiseState-
useAccountsHook for getting currently connected accounts.
useBlockHook for fetching information about the latest block.
useChainIdHook for getting the current chain ID.
useChainIdsHook for getting all configured chain IDs.
useChainSpecDataHook for fetching the JSON-RPC spec.
useClientHook for getting Polkadot-API client instance.
useConfigHook for getting the current config.
useConnectedWalletsHook for getting all connected wallets.
useContractEventListenerHook for listening to contract events.
useContractMutationHook for mutating (writing to) a contract.
useLazyLoadQueryHook for querying data from chain, and returning the response.
useMutationHook for sending transactions to chains.
useMutationListenerHook that watches for mutation events.
useNativeTokenAmountFromNumberHook for returning the native token amount from a number value
useNativeTokenAmountFromPlanckHook for returning the native token amount from a planck value.
usePromisesHook for using multiple promises in a component. Internally this uses React's `use` API.
usePromiseValueHook for tracking promise state with a fallback value.
useQueryErrorResetterHook for getting function to reset query error caught by error boundary
useQueryLoaderHook for loading queries without suspending.
useQueryRefresherHook for refreshing cached query.
useSignerHook for getting the current signer.
useSpendableBalanceHook for getting an account's spendable balance.
useSpendableBalancesHook for getting accounts’ spendable balances.
useStoreHook for getting the data store.
useTypedApiHook for getting Polkadot-API typed API.
useWalletConnectorHook for connecting wallets
useWalletDisconnectorHook for disconnecting wallets
useWalletsHook for getting all available wallets.