forked from extern/naming-cheatsheet
Update README.md
This commit is contained in:
committed by
GitHub
parent
e1cf9e1948
commit
e60f2e3f08
@ -44,11 +44,11 @@ class MenuItem {
|
||||
* Name should reflect expected result:
|
||||
```js
|
||||
/* Bad */
|
||||
const isEnabled = this.props.enabled;
|
||||
const isEnabled = (itemsCount > 3);
|
||||
return (<Button disabled={!isEnabled} />);
|
||||
|
||||
/* Good */
|
||||
const isDisabled = this.props.disabled;
|
||||
const isDisabled = (itemsCount <= 3);
|
||||
return (<Button disabled={isDisabled} />);
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user