In React, I use a Web3js call function to get a value. The returned value is in Wei. However, I want to render it in Ethers. What would be the best way to do it?
I think you're looking for
fromWei. In web3.js 0.2x.x:
In web3.js 1.0, use this:
web3.utils.fromWei(number [, unit])
^^^ You must use the utils library. If you're getting the weird, TypeError: web3.fromWei is not a function and you're trying to console log the output, try setting the function call to a constant and then console logging that constant. Like so...
yourValue = returned amount of ether
returnValue = web3.utils.fromWei(yourValue, 'ether')