Improve list of prerequisites

This commit is contained in:
Charles-Axel Dein 2020-07-22 09:47:58 +02:00
parent d909ecf5c6
commit 518ce2a38a
2 changed files with 30 additions and 5 deletions

View File

@ -378,8 +378,32 @@ for (const key in { a: "aaa", b: "bbb" }) {
## Promises
This is only going to be an introduction to the magnificent world of promise.
- Async functions (seen later) use promises as a building block.
- Promise are indeed async in nature: the calling code continues executing the promise does its thing.
- Some Web API return promises, including `Fetch`
### Creating a promise
Note: we use TypeScript in this example, to clarify what's return. You can ignore the type annotations for now.
```typescript
let isDone: boolean = true
const thePromise = new Promise((resolve, reject) => {
if (isDone) {
resolve("the work is done");
} else {
reject("this is still pending");
}
}
console.assert(thePromise === 'the work is done')
```
TODO
### Consuming a promise
### Chaining promises

View File

@ -23,10 +23,11 @@ I am not an expert in front-end development. This should only be considered an i
Assumed knowledge:
- HTTP
- Basics about browser
- Basics about HTML and CSS
- Basics about programming languages
- Basics about HTTP (cookies, protocol, HTTPS)
- Basics about browser (DOM, using the developer console)
- Basics about HTML and CSS (tags & attributes, how CSS work, CSS selectors, CSS styling)
- Basics about programming languages (conditionals, loops, variables, typing, tests)
- Basics about JavaScript (syntax, having written a few hundred lines of code)
## To do before the course
@ -36,7 +37,7 @@ Read the [grab/front-end-guide](https://github.com/grab/front-end-guide) to get
1. Modern Javascript
2. TypeScript
3. Intro to React
3. React
4. CSS/HTML restart
5. Front-end development practices