mirror of
https://github.com/kettanaito/naming-cheatsheet.git
synced 2025-08-09 06:45:00 +02:00
Update README.md
This commit is contained in:
committed by
GitHub
parent
bcfe4ff4d8
commit
e1cf9e1948
10
README.md
10
README.md
@ -92,13 +92,13 @@ function fetchPosts(postCount) {
|
||||
#### `set`
|
||||
Declaratively set `variableA` with `valueA` to `valueB`.
|
||||
```js
|
||||
function Component() {
|
||||
this.state = { fruits: 0 };
|
||||
const fruits = 0;
|
||||
|
||||
function setFruits(nextFruits) {
|
||||
this.state.fruits = nextFruits;
|
||||
}
|
||||
function setFruits(nextFruits) {
|
||||
fruits = nextFruits;
|
||||
}
|
||||
|
||||
setFruits(5); // fruits === 5
|
||||
```
|
||||
|
||||
#### `reset`
|
||||
|
Reference in New Issue
Block a user