3 ms·
Personally, I would prefer to use a library without the React Hook wrapper - and do the wrapping myself, if/when needed. The main functionality is provided by:
by lioeters 6y ago
Personally, I would prefer to use a library without the React Hook wrapper - and do the wrapping myself, if/when needed.
The main functionality is provided by:
https://github.com/ethers-io/ethers.js https://github.com/ethers-io/ethers.js
..But useNft seems to contain some useful methods, like "normalizeTokenUrl". It would be nice if all those were packaged up as a general-purpose library, separate from the React Hook itself.
- bpierre 6y agoThanks for the feedback! Releasing a “core” version of this library sounds like a good idea: as you said, it’s mostly about normalizing the variations in how NFT data is being stored, and the different utility functions are already isolated from React anyway. And yes the only fetcher is the Ethers.js one at the moment, but more will be added soon [1][2]. [1] https://github.com/spectrexyz/use-nft/issues/2 https://github.com/spectrexyz/use-nft/issues/2 [2] https://github.com/spectrexyz/use-nft/issues/3 https://github.com/spectrexyz/use-nft/issues/3