Created
December 13, 2021 15:53
-
-
Save GeoffMahugu/91b73140ed995a7fc1efc950a2b32cac to your computer and use it in GitHub Desktop.
This is the index.js file for react web3 app.
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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import { Web3ReactProvider } from '@web3-react/core' | |
import Web3 from 'web3' | |
function getLibrary(provider) { | |
return new Web3(provider) | |
} | |
ReactDOM.render( | |
<React.StrictMode> | |
<Web3ReactProvider getLibrary={getLibrary}> | |
<App /> | |
</Web3ReactProvider> | |
</React.StrictMode>, | |
document.getElementById('root') | |
); | |
reportWebVitals(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment