From 682744f816f2a6185c149171a3190cc4ca1f27ba Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Fri, 30 Jun 2017 10:49:04 +0200 Subject: [PATCH] Update README.md --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 (