You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: examples/browser-create-react-app/README.md
+7-8
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
## IPFS React app
2
2
3
-
A minimal demonstration of how to use js-ipfs in a `create-react-app` generated app.
3
+
This is a minimal demonstration of how to use `js-ipfs` in a `create-react-app` generated app.
4
4
5
-
It boots up a js-ipfs instance (an IPFS node) via a custom React hook in `./src/hooks/use-ipfs-factory.js`, which is called from `./src/App.js`. Once the IPFS node is set up, `App.js` displays its ident and its version number.
5
+
It boots up a `js-ipfs` instance (an IPFS node) via a custom React hook in `./src/hooks/use-ipfs-factory.js`, which is called from `./src/App.js`. Once the IPFS node is set up, `./src/App.js` displays the [PeerId](https://docs.libp2p.io/concepts/peer-id/) of this node and the version number of `js-ipfs` used to spawn it.
6
6
7
-
> _Remember that a Peer ID of an IPFS node is [the multihash of the public key of this node](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#peer-ids), and the public-private key pair of a node is generated by typing `ipfs init`._
7
+
> _Side note: The PeerId of the IPFS node is [the multihash of the public key of this node](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#peer-ids). The public-private key pair of a node is generated by typing `ipfs init`._
8
8
9
9

10
10
@@ -23,14 +23,14 @@ $ npm start
23
23
```
24
24
## Call structure in `App.js`
25
25
All React applications store their main logic in `App.js`:
26
-
*`App.js` renders the cosmetics of the demo and call`useIpfs` to retrieve the `id` of the node
26
+
*`App.js` renders the cosmetics of the demo and calls`useIpfs` to retrieve the `id` of the node
27
27
*`useIpfsFactory.js` initialises and closes the IPFS local node
28
28
*`useIpfs.js` does the actual calls to IPFS to retrieve the property specified in argument (here the retrieved property is `id`, requested from `App.js`)
29
29
30
30
## Annexes
31
-
### Console message `[HMR] Waiting for update signal from WDS...`
31
+
### You may be puzzled by a console message `[HMR] Waiting for update signal from WDS...`
32
32
33
-
This message comes from the hot reload capability of webpack, that can update the web app every time you save your development code. To remove it, see here: https://stackoverflow.com/questions/59695102/reactjs-console-error-hmr-waiting-for-update-signal-from-wds
33
+
This message comes from the hot reload capability of `webpack`, that can update the web app every time you save your development code. To remove it, see here: https://stackoverflow.com/questions/59695102/reactjs-console-error-hmr-waiting-for-update-signal-from-wds
34
34
35
35
### Available Scripts from create-react-app
36
36
@@ -64,5 +64,4 @@ But with modern hosting services like Heroku, Netlity or Fleek, you can skip the
64
64
65
65
You can learn more on IPFS API in the [IPFS documentation](https://docs.ipfs.io/) and [IPFS npm documentation](https://www.npmjs.com/package/ipfs-http-client).
66
66
67
-
Details how to use the File System abstraction of IPFS (add, cat, egt, ls etc.) are [here](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md)
68
-
67
+
Details how to use the File System abstraction of IPFS (add, cat, get, ls etc.) are [here](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md)
0 commit comments