@ada-anvil/sdk-enhancer-react
v0.4.0
Published
React enhancer for Anvil SDK
Downloads
63
Keywords
Readme
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>;
}