@@ -5,12 +5,11 @@ title: Building a Custom Front End
5
5
If you have made it this far, that means you _ should_ have a brand new blockchain with custom
6
6
functionality up and running.
7
7
8
- We will give you a custom react component that you can add to your ` substrate-front-end-template `
9
- meant for interacting with your node.
8
+ We will give you a custom React component that you can use to interact with your node.
10
9
11
- ## Explore the Front End Template
10
+ ## Explore the Front- End Template
12
11
13
- To start the front-end template , navigate to its directory and run:
12
+ To start the Front-End Template , navigate to its directory and run:
14
13
15
14
``` bash
16
15
yarn start
@@ -26,8 +25,7 @@ You'll see a list of pre-funded accounts, and you can make token transfers betwe
26
25
27
26
## Add Your Custom React Component
28
27
29
- In the ` substrate-front-end-template ` project, edit the ` TemplateModule.js ` file in the ` /src/ `
30
- folder:
28
+ In the Front-End Template project, edit the ` TemplateModule.js ` file in the ` /src/ ` folder:
31
29
32
30
```
33
31
substrate-front-end-template
@@ -44,7 +42,7 @@ substrate-front-end-template
44
42
+-- ...
45
43
```
46
44
47
- Delete the contents of that file, and instead use the following component.
45
+ Delete the entire contents of that file, and replace it with the following:
48
46
49
47
<div style =" max-height : 20em ; overflow : auto ; margin-bottom : 1em ;" >
50
48
@@ -63,7 +61,7 @@ import { blake2AsHex } from '@polkadot/util-crypto';
63
61
export function Main (props ) {
64
62
// Establish an API to talk to our Substrate node.
65
63
const { api } = useSubstrate ();
66
- // Get the ' selected user' from the `AccountSelector` component.
64
+ // Get the selected user from the `AccountSelector` component.
67
65
const { accountPair } = props;
68
66
// React hooks for all the state variables we track.
69
67
// Learn more at: https://reactjs.org/docs/hooks-intro.html
@@ -93,7 +91,7 @@ export function Main (props) {
93
91
fileReader .readAsArrayBuffer (file);
94
92
};
95
93
96
- // React hook to update the 'Owner' and 'Block Number' information for a file.
94
+ // React hook to update the owner and block number information for a file.
97
95
useEffect (() => {
98
96
let unsubscribe;
99
97
@@ -198,7 +196,7 @@ comments to learn what each part is doing.
198
196
199
197
## Submit a Proof
200
198
201
- Your front end template should reload when you save your changes, and you'll notice our new
199
+ Your Front-End Template should reload when you save your changes, and you'll notice our new
202
200
component. Now we're ready to try out our new dApp. Select any file on your computer, and you will
203
201
see that you can create a claim with its file digest:
204
202
@@ -220,24 +218,24 @@ you will see that the revoke option is disabled!
220
218
221
219
This is the end of our journey into creating a Proof of Existence blockchain.
222
220
223
- You have seen first hand how simple it can be to develop a brand new pallet and launch a custom
224
- blockchain using Substrate. Furthermore, we have shown you that the Substrate ecosystem provides you
225
- with the tools to quickly create responsive front-end experiences so users can interact with your
226
- blockchain.
221
+ You have seen firsthand how simple it can be to develop a brand new pallet and launch a custom
222
+ blockchain using Substrate and FRAME . Furthermore, we have shown you that the Substrate ecosystem
223
+ provides you with the tools to quickly create responsive front-end experiences so users can interact
224
+ with your blockchain.
227
225
228
226
This tutorial chose to omit some of the specific details around development in order to keep this
229
227
experience short and satisfying. However, we want you to keep learning!
230
228
231
229
To learn more about building your own pallets, explore the
232
230
[ Substrate Recipes] ( https://substrate.dev/recipes ) .
233
231
234
- It would also be a good time to call out that your success on the Substrate framework will
235
- ultimately be limited on your ability to program in Rust. The
236
- [ Rust Book] ( https://doc.rust-lang.org/book/ ) is a great resource for beginning and intermediate rust
237
- developers.
232
+ Complete the [ Add a Pallet] ( ../add-a-pallet/ ) tutorial to learn how to extend the Node Template
233
+ with additional capabilities from Substrate's set of
234
+ [ core FRAME pallets] ( ../../knowledgebase/runtime/frame ) .
238
235
239
- If you experienced any issues with this tutorial or want to provide feedback, feel free to
240
- [ open a GitHub issue] ( https://github.com/substrate-developer-hub/tutorials/issues/new ) or reach out
241
- on [ Riot] ( https://riot.im/app/#/room/!HzySYSaIhtyWrwiwEV:matrix.org ) .
236
+ If you experienced any issues with this tutorial or want to provide feedback, You can
237
+ [ ask a question on Stack Overflow] ( https://stackoverflow.com/questions/tagged/substrate ) and use the
238
+ ` substrate ` tag or contact us on
239
+ [ Element] ( https://app.element.io/#/room/!HzySYSaIhtyWrwiwEV:matrix.org ) .
242
240
243
241
We can't wait to see what you build next!
0 commit comments