@cfxdevkit/react
v1.0.16
Published
Headless React components for Conflux applications - customizable with Tailwind CSS
Downloads
883
Maintainers
Readme
@cfxdevkit/react
A set of unstyled React hooks, providers, and utilities tailored to building Conflux experiences with your own design system.
Features:
DevKitProviderestablishes RPC endpoints for Core/eSpace chains and exposes the current wallet context.- React hooks such as
useBalance,useContract, anduseTransactionthat wrap the shared Conflux clients. - Fully tree-shakeable exports so you only ship what you need.
Getting started
import { DevKitProvider, useBalance } from '@cfxdevkit/react';
const App = () => (
<DevKitProvider apiUrl="http://localhost:3001" network="testnet">
<YourComponent />
</DevKitProvider>
);Development
pnpm --filter @cfxdevkit/react install
pnpm --filter @cfxdevkit/react build
pnpm --filter @cfxdevkit/react testTesting and linting
- Tests run with
vitest. - Formatting and linting use Biome.
