mirror of
https://github.com/waku-org/js.waku.guide.git
synced 2025-02-22 19:58:13 +00:00
Update docs with breaking change function name (#35)
This commit is contained in:
parent
be6692ea9b
commit
bba925848c
@ -55,7 +55,7 @@ To ensure that you have relay peers available to send and receive messages,
|
|||||||
use the following function:
|
use the following function:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await waku.waitForConnectedPeer();
|
await waku.waitForRemotePeer();
|
||||||
```
|
```
|
||||||
|
|
||||||
The returned `Promise` will resolve once you are connected to a Waku Relay peer.
|
The returned `Promise` will resolve once you are connected to a Waku Relay peer.
|
||||||
|
@ -69,7 +69,7 @@ To ensure that you have store peers available to retrieve historical messages fr
|
|||||||
use the following function:
|
use the following function:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await waku.waitForConnectedPeer();
|
await waku.waitForRemotePeer();
|
||||||
```
|
```
|
||||||
|
|
||||||
The returned Promise will resolve once you are connected to a Waku Store peer.
|
The returned Promise will resolve once you are connected to a Waku Store peer.
|
||||||
|
@ -69,7 +69,7 @@ To ensure that you have a light push peer available to send messages to,
|
|||||||
use the following function:
|
use the following function:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
await waku.waitForConnectedPeer();
|
await waku.waitForRemotePeer();
|
||||||
```
|
```
|
||||||
|
|
||||||
The returned `Promise` will resolve once you are connected to a Waku peer.
|
The returned `Promise` will resolve once you are connected to a Waku peer.
|
||||||
|
@ -213,7 +213,7 @@ export default App;
|
|||||||
|
|
||||||
When using the `bootstrap` option, it may take some time to connect to other peers.
|
When using the `bootstrap` option, it may take some time to connect to other peers.
|
||||||
To ensure that you have relay peers available to send and receive messages,
|
To ensure that you have relay peers available to send and receive messages,
|
||||||
use the `Waku.waitForConnectedPeer()` async function:
|
use the `Waku.waitForRemotePeer()` async function:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@ -225,7 +225,7 @@ React.useEffect(() => {
|
|||||||
Waku.create({ bootstrap: { default: true } }).then((waku) => {
|
Waku.create({ bootstrap: { default: true } }).then((waku) => {
|
||||||
setWaku(waku);
|
setWaku(waku);
|
||||||
setWakuStatus("Connecting");
|
setWakuStatus("Connecting");
|
||||||
waku.waitForConnectedPeer().then(() => {
|
waku.waitForRemotePeer().then(() => {
|
||||||
setWakuStatus("Ready");
|
setWakuStatus("Ready");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -239,7 +239,7 @@ export default App;
|
|||||||
|
|
||||||
When using the `bootstrap` option, it may take some time to connect to other peers.
|
When using the `bootstrap` option, it may take some time to connect to other peers.
|
||||||
To ensure that you have store peers available to retrieve messages from,
|
To ensure that you have store peers available to retrieve messages from,
|
||||||
use the `Waku.waitForConnectedPeer()` async function:
|
use the `Waku.waitForRemotePeer()` async function:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
@ -247,7 +247,7 @@ React.useEffect(() => {
|
|||||||
|
|
||||||
if (wakuStatus === "Connected") return;
|
if (wakuStatus === "Connected") return;
|
||||||
|
|
||||||
waku.waitForConnectedPeer().then(() => {
|
waku.waitForRemotePeer().then(() => {
|
||||||
setWakuStatus("Connected");
|
setWakuStatus("Connected");
|
||||||
});
|
});
|
||||||
}, [waku, wakuStatus]);
|
}, [waku, wakuStatus]);
|
||||||
@ -447,7 +447,7 @@ function App() {
|
|||||||
|
|
||||||
if (wakuStatus === "Connected") return;
|
if (wakuStatus === "Connected") return;
|
||||||
|
|
||||||
waku.waitForConnectedPeer().then(() => {
|
waku.waitForRemotePeer().then(() => {
|
||||||
setWakuStatus("Connected");
|
setWakuStatus("Connected");
|
||||||
});
|
});
|
||||||
}, [waku, wakuStatus]);
|
}, [waku, wakuStatus]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user