ankr-react
v0.3.0
Published
React hooks and components built on top of Ankr's Advanced APIs and Ankr.js
Downloads
62
Readme
ankr-react
React hooks and components built on top of Ankr's Advanced APIs and Ankr.js
Usage
- Install the package
npm install ankr-react
yarn add ankr-react
- Wrap your app with the
<Provider />
component
import { Provider } from 'ankr-react';
function MyApp({ Component, pageProps }) {
return (
<Provider>
<Component {...pageProps} />
</Provider>
);
}
export default MyApp;
- Use the hooks
import { useNFTsByOwner } from 'ankr-react';
const Page = () => {
const {data, error, isLoading} = useNFTsByOwner({
walletAddress: '0x0ED6Cec17F860fb54E21D154b49DAEFd9Ca04106',
blockchain: ['eth', 'polygon'],
})
return (
...
)
}