0.0.4 • Published 3 years ago
react-list-nfts v0.0.4
React-List-NFTS
React-List-NFTS is a npm library for listing all NFTS
of any Etherscan
contract using contract address
and Contract ABI
.
Installation
Use the package manager npm to install react-list-nfts.
npm install react-list-nfts
Requirements
- React or Next js
- Metamask
Usage
import {ReactListNfts} from 'react-list-nfts'
import 'react-list-nfts/index.css' //or
import 'react-list-nfts/dist/index.css'
Example
"nftContractABI" can be fetched from etherscan
import {ReactListNfts} from 'react-list-nfts'
const nftContractABI = {...} // contract abi related to that address
const ListAllNfts = ()=>{
const [contractAddress] = useState('your_contract_address')
return (
<>
<h1>All NFTS</h1>
<ReactListNfts
nftContractABI={nftContractABI}
itemsPerPage={5}
contractAddress={contractAddress}
/>
</>
)
}
Note
Feel Free to report issue/github on github