Package Exports
- @tezos-contrib/nft-hooks
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tezos-contrib/nft-hooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@tezos-contrib/nft-hooks
React hooks to fetch NFTs on Tezos
Installation
- Npm
npm install --save @tezos-contrib/nft-hooks @taquito/taquito- Yarn
yarn add @tezos-contrib/nft-hooks @taquito/taquitoExample usage
import { useNFT } from '@tezos-contrib/nft-hooks';
export default function App() {
const { data, error, loading } = useNFT('KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton', [
'270248',
'270560',
]);
return (
<div>
{loading && <p>Loading...</p>}
{loading && data && data.map((item) => <p>{item.name}</p>)}
</div>
);
}