Skip to content

docs: add comprehensive hooks reference (#33) - #76

Open
ulsreall wants to merge 1 commit into
celo-org:mainfrom
ulsreall:docs/hooks-reference
Open

docs: add comprehensive hooks reference (#33)#76
ulsreall wants to merge 1 commit into
celo-org:mainfrom
ulsreall:docs/hooks-reference

Conversation

@ulsreall

Copy link
Copy Markdown

What

Adds detailed documentation for all 8 hooks in composer-kit, closing #33.

New file:

Hook Description
Read ERC20 token balance
Resolve ENS name and avatar from address
Fetch social links (GitHub, Twitter, Farcaster) from ENS
Fetch NFT metadata and ownership on Celo
Mint NFTs with support for various contract patterns
Execute transactions with chain switching and status tracking
Track transaction lifecycle status
Access wagmi configuration

Each hook includes:

  • Import path
  • Parameters table with types
  • Return values table
  • Working code example
  • Implementation notes

Updated:

Added a Hooks section with a summary table linking to the full reference.

Why

The hooks are currently undocumented. This makes it hard for developers to discover and use them. The documentation follows the same style as the existing component docs in the README.

Testing

  • Verified all import paths match the actual source code
  • Cross-referenced parameter types with TypeScript interfaces
  • Code examples follow the patterns used in existing components

Add detailed documentation for all 8 hooks in composer-kit:
- useBalance: ERC20 token balance reader
- useIdentity: ENS name and avatar resolver
- useSocial: Social links from ENS text records
- useNFTData: NFT metadata and ownership fetcher
- useMintNFT: NFT minting with multi-pattern support
- useTransactionHandler: Transaction execution with chain switching
- useTransactionLifecycle: Transaction status tracking
- useConfig: Wagmi configuration access

Each hook includes: import path, parameters, return values,
working examples, and implementation notes.

Also adds a Hooks section to README.md with a summary table
linking to the full reference.

Closes celo-org#33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant