diff --git a/README.md b/README.md index e806d26..3b5f371 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Naming things is hard. Is it? * **Descriptive**. Name of the variable should reflect what this variable possesses/does in the most efficient way, * **Intuitive**. Name of the variable should read naturally, as close to common speach as possible ```js -/* Bad namings */ +/* Bad */ const a = 5; // "a" could mean anything const isPaginatable = (a > 10); // "Paginatable" sounds extremely unnatural -/* Good namings */ +/* Good */ const postsCount = 5; const shouldDisplayPagination = (postsCount > 10); ``` @@ -26,6 +26,16 @@ class MenuItem { handleClick = (event) => { ... } } ``` +* Name should reflect expected result: +```js +/* Bad */ +const isEnabled = this.props.enabled; +return (