Using React js i am trying to create a wallet

I want to implement few functionalities 1) display balances of all the accounts 2) Display tokens by providing smart contract address

how can i implement this wallet functionality using reactjs??

  • 1
    Your question is too broad. Could you be more specific? What kind of problem you have? Nov 2, 2017 at 7:17
  • I want to develop ethereum wallet using reactjs. In 1st i want to display balances, import wallets... normal wallet functionalities. I am new to react please help me out to start proceeding. My first task is to display balances
    – user4498
    Nov 2, 2017 at 7:24
  • Did you tried npmjs.com/package/ethereumjs-wallet ? Nov 2, 2017 at 7:30

1 Answer 1


Basic JavaScript works perfectly fine in React. The most popular Ethereum JS library today seems to be the Web3 JavaScript API. Review their API to find your solutions and specifically balance requests.

Ethers.js is another fantastic library. Here is a snippet of code from our apps.

/* Import the ethers.js library. */
import ethers from 'ethers'

/* Initialize ethers classes. */
const _wallet    = ethers.Wallet
const _hdNode    = ethers.HDNode
const _providers = ethers.providers
const _utils     = ethers.utils

/* Connect to Ropsten (the test network). */
const TESTNET = false

/* Set the default provider. */
const PROVIDER = _providers.getDefaultProvider(TESTNET)

/* Retrieve the balance from a wallet address. */
const getBalanceByAddress = function (address) {
    return PROVIDER.getBalance(address)
        .then(balance => {
            /* Balance is a BigNumber (in wei). */
            let etherString = _utils.formatEther(balance)

            return etherString

Importing / exporting wallets and building / sending transactions can be done from either library as well. Good luck!

Not the answer you're looking for? Browse other questions tagged or ask your own question.