React hooks library for Polkadot SDK chains, inspired by wagmi.
In the current state the package is just for fun and exploration.
npm install dyorYou can use this library with any react project. Wrap your React app in the DyorProvider and pass the chains you want to use as props.
import { DyorProvider } from 'dyor'
wss://polkadot-asset-hub-rpc.polkadot.io
function App() {
return (
<DyorProvider config={config}>
{/** ... */}
</DyorProvider>
)
}import { useChain } from 'dyor'
function ChainConstants() {
const AssetHub = useChain('AssetHub')
...
}