Skip to content
/ dyor Public

React hooks library for Polkadot SDK chains, inspired by wagmi.

Notifications You must be signed in to change notification settings

peetzweg/dyor

Repository files navigation

DYOR Image

React hooks library for Polkadot SDK chains, inspired by wagmi.

In the current state the package is just for fun and exploration.

Build Size Version Downloads

Getting Started

Installation

npm install dyor

Setup

You 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>
  )
}

Usage

import { useChain } from 'dyor'

function ChainConstants() {
  const AssetHub = useChain('AssetHub')

  ...
}

About

React hooks library for Polkadot SDK chains, inspired by wagmi.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •