|
@ -23,23 +23,21 @@ let a = 42; |
|
|
Bad 👎🏻 |
|
|
Bad 👎🏻 |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
let age = 42 |
|
|
let age = 42; |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### 💩 Always write comments in your local language |
|
|
### 💩 Always write comments in your local language |
|
|
|
|
|
|
|
|
_You don’t want it to be readable by oversees teams._ |
|
|
|
|
|
|
|
|
|
|
|
Good 👍🏻 |
|
|
Good 👍🏻 |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
// Обновляем состояние компонента |
|
|
// Закриваємо модальне віконечко при виникненні помилки. |
|
|
setAge(42) |
|
|
toggleModal(false); |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
Bad 👎🏻 |
|
|
Bad 👎🏻 |
|
|
|
|
|
|
|
|
```javascript |
|
|
```javascript |
|
|
// Update component state |
|
|
// Hide modal window on error. |
|
|
setAge(42) |
|
|
toggleModal(false); |
|
|
``` |
|
|
``` |