React Hooks Setup

We write our components in react-native-web so they are compatible with both web and mobile platforms.

We use the following packages for the web3 react experience:

  • native-base

  • react-native-web

  • useDapp

  • ethers

To use the react hooks SDK, you'll need to make sure you have the following installed:

yarn install @usedapp/core ethers react-native-async-storage/async-storage react react-native react-native-web

Then, you'll need to create a context provider which is a wrapper around useDapp context provider:

import { Celo, Fuse, Web3Provider, AsyncStorage } from '@gooddollar/web3sdk-v2'
import { Goerli, Mainnet } from '@usedapp/core'


const contractsEnv = "production"

return (<Web3Provider
                    pollingInterval: 15000,
                    networks: [Goerli, Mainnet, Fuse, Celo],
                    readOnlyChainId: undefined,
                    readOnlyUrls: {
                        1: '',
                        122: '',
                        42220: '',

Need a hand?

Fill out this form to request support:

Last updated