ankr-react
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

ankr-react

React hooks and components built on top of Ankr's Advanced APIs and Ankr.js

Usage

  1. Install the package
npm install ankr-react

yarn add ankr-react
  1. Wrap your app with the <Provider /> component
import { Provider } from 'ankr-react';

function MyApp({ Component, pageProps }) {
  return (
    <Provider>
      <Component {...pageProps} />
    </Provider>
  );
}

export default MyApp;
  1. Use the hooks
import { useNFTsByOwner } from 'ankr-react';

const Page = () => {
  const {data, error, isLoading} = useNFTsByOwner({
    walletAddress: '0x0ED6Cec17F860fb54E21D154b49DAEFd9Ca04106',
    blockchain: ['eth', 'polygon'],
  })

  return (
    ...
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i ankr-react

Weekly Downloads

30

Version

0.3.0

License

MIT

Unpacked Size

152 kB

Total Files

47

Last publish

Collaborators

  • dhaiwat10