Skip to content

useBundlerClient

Custom hook to get a bundler client using the Alchemy account context. It uses useSyncExternalStore to watch for any changes in the bundler client configuration and provides the updated bundler client.

Import

import { useBundlerClient } from "@account-kit/react";

Usage

import { useBundlerClient } from "@account-kit/react";
 
const bundlerClient = useBundlerClient();

Returns

BundlerClient The bundler client based on the current Alchemy account configuration