Decentralized applications are made of smart contracts and user interfaces. Now that we have both elements, we can combine them by connecting the frontend with the backend using web3, the most powerful tool for interacting with the Ethereum blockchain from the browser.
Let's start by getting web3.js. You can install it with the following command:
npm i -S web3
Then, import it into your index.js file, as follows:
import React from 'react'
import ReactDOM from 'react-dom'
import web3 from 'web3'
import './index.css'
You don't really need to install web3 since most, if not all of your users will have MetaMask installed, which automatically injects web3.js to your application. Nevertheless, it is good practice to have web3 in your application's code because you can control which version...