Skip to main content

sdk-enhancer-react


Anvil SDK React Enhancer

Website

This enhancer adds React hooks that can be used to make some Anvil Client SDK data reactive.

Installation

npm install @ada-anvil/sdk-core @ada-anvil/sdk-enhancer-react

Usage

import { reactEnhancer } from "@ada-anvil/sdk-enhancer-react";

const enhancedSdk = anvil.enhance(reactEnhancer);

function ReactComp() {
const wallet = enhancedSdk.enhancers.react.wallet.useName();

return <div>Connected wallet: {wallet}</div>;
}