Files
github-actions[bot]andgithub-actions[bot] 32e7fb0c96 Version Packages (#92)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-13 15:24:45 -07:00

9.0 KiB

@thirdweb-dev/react

3.0.0

Major Changes

  • #19 82627ea Thanks @joaquim-verges! - 3.0.0 update

    MAJOR VERSION CHANGE

    • 85% reduction in package size!
    • Custom contracts are now first class citizens

    Full changelog

    Breaking changes:

    1. Hooks now accept custom contracts direclty and handle the logic internally

    before

    const { contract } = useContract(...)
    const { data: nfts } = useNFTs(contract?.nft)
    const { mutation: claim } = useClaimNFT(contract?.nft)
    

    after

    const { contract } = useContract(...)
    // works with any ERC721/ERC1155 contract
    const { data: nfts} = useNFTs(contract)
    const { mutation: claim } = useClaimNFT(contract)
    
    1. Custom contract hooks for reading and writing have been renamed:

    before

    const { contract } = useContract(...)
    const { data } = useContractData(contract, "myReadFunction", ...args);
    const { mutate: myFunction } = useContractCall(contract, "myWriteFunction");
    

    after

    const { contract } = useContract(...)
    const { data } = useContractRead(contract, "myReadFunction", ...args);
    const { mutate: myFunction } = useContractWrite(contract, "myWriteFunction");
    
    1. Web3Button benefits from the new Extension detection API:

    before

    <Web3Button
      contractAddress={...}
      action={(contract) => contract.nft?.drop?.claim?.to(...)}
      >
      Claim
      </Web3Button>
    

    after

    <Web3Button
      contractAddress={...}
      action={(contract) => contract.erc721.claim(...) }
      >
      Claim
      </Web3Button>
    

Minor Changes

  • #106 0fa6f3f Thanks @jnsdls! - switch all contracts to a new, universal useContract() hook

Patch Changes

2.9.7

Patch Changes

2.9.6

Patch Changes

2.9.5

Patch Changes

2.9.4

Patch Changes

2.9.3

Patch Changes

2.9.2

Patch Changes

2.9.1

Patch Changes

2.9.0

Minor Changes

  • #42 46ad691 Thanks @jnsdls! - remove functionName + params option from <Web3Button> - use action={...} instead

Patch Changes

2.8.1

Patch Changes

2.8.0

Minor Changes

  • 3abe26c: initialze monorepo packages

Patch Changes

2.7.5

Patch Changes