Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit 8caf995

Browse files
committed
Tutorials 1 & 2 Update & Refactor
1 parent 7278cdf commit 8caf995

File tree

8 files changed

+219
-208
lines changed

8 files changed

+219
-208
lines changed

docs/tutorials/build-a-dapp/front-end.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ title: Building a Custom Front End
55
If you have made it this far, that means you _should_ have a brand new blockchain with custom
66
functionality up and running.
77

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.
109

11-
## Explore the Front End Template
10+
## Explore the Front-End Template
1211

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:
1413

1514
```bash
1615
yarn start
@@ -26,8 +25,7 @@ You'll see a list of pre-funded accounts, and you can make token transfers betwe
2625

2726
## Add Your Custom React Component
2827

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:
3129

3230
```
3331
substrate-front-end-template
@@ -44,7 +42,7 @@ substrate-front-end-template
4442
+-- ...
4543
```
4644

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:
4846

4947
<div style="max-height: 20em; overflow: auto; margin-bottom: 1em;">
5048

@@ -63,7 +61,7 @@ import { blake2AsHex } from '@polkadot/util-crypto';
6361
export function Main (props) {
6462
// Establish an API to talk to our Substrate node.
6563
const { api } = useSubstrate();
66-
// Get the 'selected user' from the `AccountSelector` component.
64+
// Get the selected user from the `AccountSelector` component.
6765
const { accountPair } = props;
6866
// React hooks for all the state variables we track.
6967
// Learn more at: https://reactjs.org/docs/hooks-intro.html
@@ -93,7 +91,7 @@ export function Main (props) {
9391
fileReader.readAsArrayBuffer(file);
9492
};
9593

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.
9795
useEffect(() => {
9896
let unsubscribe;
9997

@@ -198,7 +196,7 @@ comments to learn what each part is doing.
198196

199197
## Submit a Proof
200198

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
202200
component. Now we're ready to try out our new dApp. Select any file on your computer, and you will
203201
see that you can create a claim with its file digest:
204202

@@ -220,24 +218,24 @@ you will see that the revoke option is disabled!
220218

221219
This is the end of our journey into creating a Proof of Existence blockchain.
222220

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.
227225

228226
This tutorial chose to omit some of the specific details around development in order to keep this
229227
experience short and satisfying. However, we want you to keep learning!
230228

231229
To learn more about building your own pallets, explore the
232230
[Substrate Recipes](https://substrate.dev/recipes).
233231

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).
238235

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).
242240

243241
We can't wait to see what you build next!

docs/tutorials/build-a-dapp/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Introduction
33
---
44

55
In this tutorial, you will learn to create a custom
6-
["Proof Of Existence"](https://en.wikipedia.org/wiki/Proof_of_Existence) dApp using the Substrate
7-
blockchain development framework.
6+
["Proof of Existence"](https://en.wikipedia.org/wiki/Proof_of_Existence) dApp using the Substrate
7+
blockchain development framework and [FRAME](../../knowledgebase/runtime/frame) runtime libraries.
88

99
This tutorial should take you about **1 hour** to complete. We will be using the
1010
[Rust programming language](https://www.rust-lang.org/) and [ReactJS](https://reactjs.org/), but you
@@ -19,8 +19,9 @@ We only expect that:
1919
- You are open to learning about the bleeding edge of blockchain development.
2020

2121
If you run into an issue on this tutorial, **we are here to help!** You can
22-
[create a new issue](https://github.com/substrate-developer-hub/tutorials/issues/new) or contact us
23-
on [Riot](https://riot.im/app/#/room/!HzySYSaIhtyWrwiwEV:matrix.org).
22+
[ask a question on Stack Overflow](https://stackoverflow.com/questions/tagged/substrate) and use the
23+
`substrate` tag or contact us on
24+
[Element](https://app.element.io/#/room/!HzySYSaIhtyWrwiwEV:matrix.org).
2425

2526
## What you will be doing
2627

0 commit comments

Comments
 (0)