From 72885ff377a513e078a85deaa391ac5f85ff74dd Mon Sep 17 00:00:00 2001 From: SayBGM Date: Tue, 4 Dec 2018 22:43:56 +0900 Subject: [PATCH] Edit inline conditional expressions Example of Inline Conditional Expression Fixes that source code is unnatural --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6875b4f9..8f848c45 100644 --- a/README.md +++ b/README.md @@ -561,15 +561,17 @@ ```jsx harmony

Hello!

{ - messages.length > 0 && -

- You have {messages.length} unread messages. -

+ messages.length > 0 && !isLogin? +

+ You have {messages.length} unread messages. +

+ : +

+ You don't have unread messages. +

} ``` - - 18. ### What are "key" props and what is the benefit of using them in arrays of elements? A `key` is a special string attribute you **should** include when creating arrays of elements. *Keys* help React identify which items have changed, are added, or are removed.