Created
July 12, 2020 09:24
-
-
Save chiptus/320a8fa0f1036381301cbf90221bfd47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useState} from 'react' | |
export function useBalanceState(address = '') { | |
const [balance, setBalance] = useState(0); | |
const [error, setError] = useState(''); | |
const [loading, setLoading] = useState(false); | |
... | |
return {balance, error, loading}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment