ES6 code for web3
Contents

ES6 code for web3

import React, { useState, useEffect } from "react"; import getWeb3 from "./getWeb3"; import SimpleStorage from "./contracts/SimpleStorage.json"; import "./App.css";

const App = () => { const [state, setState] = useState({ web3: null, contract: null, }); const [storageValue, setStorageValue] = useState(null);

useEffect(() => { const init = async () => { try { const web3 = await getWeb3();

    const networkId = await web3.eth.net.getId();
    const depl...
User avatar

Congratulations

1 videos - 1min
 Enroll in the Course to Claim Certificate