diff --git a/docs/docs/conditional-rendering.md b/docs/docs/conditional-rendering.md index cb120a8947..c737206295 100644 --- a/docs/docs/conditional-rendering.md +++ b/docs/docs/conditional-rendering.md @@ -30,9 +30,8 @@ function Greeting(props) { const isLoggedIn = props.isLoggedIn; if (isLoggedIn) { return ; - } else { - return ; } + return ; } ReactDOM.render( diff --git a/docs/docs/introducing-jsx.md b/docs/docs/introducing-jsx.md index 56e7b98e85..75b9a5622d 100644 --- a/docs/docs/introducing-jsx.md +++ b/docs/docs/introducing-jsx.md @@ -60,9 +60,8 @@ This means that you can use JSX inside of `if` statements and `for` loops, assig function getGreeting(user) { if (user) { return

Hello, {formatName(user)}!

; - } else { - return

Hello, Stranger.

; } + return

Hello, Stranger.

; } ``` diff --git a/docs/docs/lifting-state-up.md b/docs/docs/lifting-state-up.md index 912ee89cdb..6b75c4ce7f 100644 --- a/docs/docs/lifting-state-up.md +++ b/docs/docs/lifting-state-up.md @@ -16,9 +16,8 @@ We will start with a component called `BoilingVerdict`. It accepts the `celsius` function BoilingVerdict(props) { if (props.celsius >= 100) { return

The water would boil.

; - } else { - return

The water would not boil.

; } + return

The water would not boil.

; } ```