Update source/_posts/2020-03-18-subspace-2.0.md
Co-Authored-By: Jonathan Rainville <rainville.jonathan@gmail.com>
This commit is contained in:
parent
3a053d2c46
commit
1087cc14c5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue