feat: update site
This commit is contained in:
parent
23a59ce171
commit
7d7ae94cc8
File diff suppressed because one or more lines are too long
15
api.html
15
api.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item is-active">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -272,6 +273,7 @@
|
|||
<li><code>fromBlock</code> - <code>Number</code> (optional): The block number from which to get events on.</li>
|
||||
<li><code>toBlock</code> - <code>Number</code> (optional): The block number to get events up to (Defaults to <code>"latest"</code>)</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.</li>
|
||||
<li><code>saveToDb</code> - <code>Boolean</code> (optional): Store events into a local database for faster data retrievals. (default: <code>true</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
@ -312,7 +314,8 @@
|
|||
<li><code>filter</code> - <code>Object</code> (optional): Lets you filter events by indexed parameters, e.g. <code>{filter: {myNumber: [12,13]}}</code> means all events where <code>"myNumber"</code> is <code>12</code> or <code>13</code>.</li>
|
||||
<li><code>fromBlock</code> - <code>Number</code> (optional): The block number from which to get events on.</li>
|
||||
<li><code>toBlock</code> - <code>Number</code> (optional): The block number to get events up to (Defaults to <code>"latest"</code>)</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.\</li>
|
||||
<li><code>saveToDb</code> - <code>Boolean</code> (optional): Store events into a local database for faster data retrievals. (default: <code>true</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
15
de/api.html
15
de/api.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -272,6 +273,7 @@
|
|||
<li><code>fromBlock</code> - <code>Number</code> (optional): The block number from which to get events on.</li>
|
||||
<li><code>toBlock</code> - <code>Number</code> (optional): The block number to get events up to (Defaults to <code>"latest"</code>)</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.</li>
|
||||
<li><code>saveToDb</code> - <code>Boolean</code> (optional): Store events into a local database for faster data retrievals. (default: <code>true</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
@ -312,7 +314,8 @@
|
|||
<li><code>filter</code> - <code>Object</code> (optional): Lets you filter events by indexed parameters, e.g. <code>{filter: {myNumber: [12,13]}}</code> means all events where <code>"myNumber"</code> is <code>12</code> or <code>13</code>.</li>
|
||||
<li><code>fromBlock</code> - <code>Number</code> (optional): The block number from which to get events on.</li>
|
||||
<li><code>toBlock</code> - <code>Number</code> (optional): The block number to get events up to (Defaults to <code>"latest"</code>)</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.</li>
|
||||
<li><code>topics</code> - <code>Array</code> (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (<code>topic[0]</code>) will not be set automatically.\</li>
|
||||
<li><code>saveToDb</code> - <code>Boolean</code> (optional): Store events into a local database for faster data retrievals. (default: <code>true</code>)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -251,14 +252,18 @@
|
|||
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-bash"># Using npm
|
||||
npm install --save @embarklabs/subspace
|
||||
npm install --save @embarklabs/subspace web3 rxjs
|
||||
|
||||
# Using yarn
|
||||
yarn add @embarklabs/subspace
|
||||
yarn add @embarklabs/subspace web3 rxjs
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
<div class="c-notification">
|
||||
Notice that we also include <code>web3</code> and <code>rxjs</code>. These are required peer dependencies
|
||||
</div>
|
||||
|
||||
<h2 id="Importing-the-library"><a href="#Importing-the-library" class="headerlink" title="Importing the library"></a>Importing the library</h2>
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-js">// ESM (might require babel / browserify)
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -256,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<h3 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h3><h4 id="SubspaceProvider"><a href="#SubspaceProvider" class="headerlink" title="SubspaceProvider"></a>SubspaceProvider</h4><p>To use most of the <code>subspace-react</code> components, you need to wrap your app with the <code><SubspaceProvider web3={web3} /></code> component. This will make Subspace available to any nested components that accesses it via the <code>useSubspace</code> hook or has been wrapped in the <code>withSubspace</code> 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 <code>SubspaceProvider</code> requires a web3 object</p>
|
||||
<h3 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h3><h4 id="SubspaceProvider"><a href="#SubspaceProvider" class="headerlink" title="SubspaceProvider"></a>SubspaceProvider</h4><p>To use most of the <code>subspace-react</code> components, you need to wrap your app with the <code><SubspaceProvider web3={web3} /></code> component. This will make Subspace available to any nested components that accesses it via the <code>useSubspace</code> hook or has been wrapped in the <code>withSubspace</code> 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 <code>SubspaceProvider</code> requires a web3 object and can receive an <code>options</code> object to initialize Subspace (optional).</p>
|
||||
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-js">// index.js
|
||||
|
@ -269,7 +270,7 @@ const web3 = new Web3("ws://localhost:8545");
|
|||
|
||||
const rootElement = document.getElementById('root')
|
||||
ReactDOM.render(
|
||||
<SubspaceProvider web3={web3}>
|
||||
<SubspaceProvider web3={web3} options={options}>
|
||||
<MyApp />
|
||||
</SubspaceProvider>,
|
||||
rootElement
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
11
de/vue.html
11
de/vue.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/de/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/de/api.html" title="Getting started"
|
||||
<a href="/de/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item is-active">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -251,14 +252,18 @@
|
|||
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-bash"># Using npm
|
||||
npm install --save @embarklabs/subspace
|
||||
npm install --save @embarklabs/subspace web3 rxjs
|
||||
|
||||
# Using yarn
|
||||
yarn add @embarklabs/subspace
|
||||
yarn add @embarklabs/subspace web3 rxjs
|
||||
</code></pre>
|
||||
|
||||
|
||||
|
||||
<div class="c-notification">
|
||||
Notice that we also include <code>web3</code> and <code>rxjs</code>. These are required peer dependencies
|
||||
</div>
|
||||
|
||||
<h2 id="Importing-the-library"><a href="#Importing-the-library" class="headerlink" title="Importing the library"></a>Importing the library</h2>
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-js">// ESM (might require babel / browserify)
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
11
index.html
11
index.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item is-active">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
15
react.html
15
react.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -256,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<h3 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h3><h4 id="SubspaceProvider"><a href="#SubspaceProvider" class="headerlink" title="SubspaceProvider"></a>SubspaceProvider</h4><p>To use most of the <code>subspace-react</code> components, you need to wrap your app with the <code><SubspaceProvider web3={web3} /></code> component. This will make Subspace available to any nested components that accesses it via the <code>useSubspace</code> hook or has been wrapped in the <code>withSubspace</code> 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 <code>SubspaceProvider</code> requires a web3 object</p>
|
||||
<h3 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h3><h4 id="SubspaceProvider"><a href="#SubspaceProvider" class="headerlink" title="SubspaceProvider"></a>SubspaceProvider</h4><p>To use most of the <code>subspace-react</code> components, you need to wrap your app with the <code><SubspaceProvider web3={web3} /></code> component. This will make Subspace available to any nested components that accesses it via the <code>useSubspace</code> hook or has been wrapped in the <code>withSubspace</code> 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 <code>SubspaceProvider</code> requires a web3 object and can receive an <code>options</code> object to initialize Subspace (optional).</p>
|
||||
|
||||
<!-- Has Prism -->
|
||||
<pre class="line-numbers" style="" ><code class="language-js">// index.js
|
||||
|
@ -269,7 +270,7 @@ const web3 = new Web3("ws://localhost:8545");
|
|||
|
||||
const rootElement = document.getElementById('root')
|
||||
ReactDOM.render(
|
||||
<SubspaceProvider web3={web3}>
|
||||
<SubspaceProvider web3={web3} options={options}>
|
||||
<MyApp />
|
||||
</SubspaceProvider>,
|
||||
rootElement
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
11
readme.html
11
readme.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
11
redux.html
11
redux.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
11
vue.html
11
vue.html
|
@ -54,14 +54,15 @@
|
|||
class="o-navigation__item ">
|
||||
Getting started
|
||||
</a>
|
||||
<a href="/integrations-overview.html" title="Getting started"
|
||||
class="o-navigation__item ">
|
||||
Integrations
|
||||
</a>
|
||||
<a href="/api.html" title="Getting started"
|
||||
<a href="/api.html" title="API"
|
||||
class="o-navigation__item ">
|
||||
API
|
||||
</a>
|
||||
<a href="https://github.com/embarklabs/subspace" title="Github"
|
||||
class="o-navigation__item">
|
||||
Github
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue