@siafoundation/explored-react
v0.3.1
Published
React hooks for interacting with `explored`.
Downloads
84
Readme
explored-react
React hooks for interacting with the explored
API.
installation
npm install @siafoundation/explored-react
usage
import { useTxpoolFee } from '@siafoundation/explored-react'
import { LoadingSpinner } from 'some-component-library'
export function TransactionPoolFeeIndicator() {
const { data: fee, isValidating, error } = useTxpoolFee()
if (fee) {
return <span>{fee}<span>
}
if (isValidating) {
return <LoadingSpinner />
}
return <span>{error.message}</span>
}
explored libraries
- types
- sdk
- react hooks (this repo)
API documentation
https://api.sia.tech/explored
The Sia Foundation
This library is brought to you by The Sia Foundation, Inc.--a registered 501(c)(3) non-profit dedicated to revolutionizing data storage through decentralization.