mirror of
https://github.com/kettanaito/naming-cheatsheet.git
synced 2025-08-09 14:55:01 +02:00
Update README.md
This commit is contained in:
committed by
GitHub
parent
81b823d425
commit
1099890560
@ -132,7 +132,7 @@ function fetchPosts(postCount) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### `set`
|
#### `set`
|
||||||
Declaratively sets a variable with value` A` to value `B`.
|
Declaratively sets a variable with value `A` to value `B`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const fruits = 0;
|
const fruits = 0;
|
||||||
@ -230,7 +230,7 @@ if (isBlue && isPresent) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### `has`
|
#### `has`
|
||||||
Describes whether the current context possesses a certain value or state.
|
Describes whether the current context possesses a certain value or state (returns `Boolean`).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
/* Bad */
|
/* Bad */
|
||||||
@ -263,7 +263,7 @@ function PostsList() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### `prev`/`next`
|
#### `prev`/`next`
|
||||||
Indicate the previous and the next state of a variable in the current context. Useful for describing a state transition.
|
Indicate the previous and the next state of a variable in the current context. Useful for describing state transitions.
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
function fetchPosts() {
|
function fetchPosts() {
|
||||||
|
Reference in New Issue
Block a user