Update source/_posts/2020-03-18-subspace-2.0.md

Co-Authored-By: Jonathan Rainville <rainville.jonathan@gmail.com>
This commit is contained in:
Richard Ramos 2020-03-18 14:26:56 -04:00 committed by Jakub Sokołowski
parent 3a053d2c46
commit 1087cc14c5
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ npm install --save @embarklabs/subspace-react web3 rxjs
### Usage
#### SubspaceProvider
To use most of the `subspace-react` components, you need to wrap your app with the `<SubspaceProvider web3={web3} />` component. This will make Subspace available to any nested components that accesses it via the `useSubspace` hook or has been wrapped in the `withSubspace` higher order component. Any React component might use Subspace so it makes sense to add the provider near the top level of your dApp. The `SubspaceProvider` requires a web3 object
To use most of the `subspace-react` components, you need to wrap your app with the `<SubspaceProvider web3={web3} />` component. This will make Subspace available to any nested components that accesses it via the `useSubspace` hook or has been wrapped in the `withSubspace` higher order component. Any React component might use Subspace so it makes sense to add the provider near the top level of your DApp. The `SubspaceProvider` requires a web3 object to interact with an Ethereum node.
```js
// index.js