@ -30,9 +30,8 @@ function Greeting(props) {
const isLoggedIn = props.isLoggedIn;
if (isLoggedIn) {
return <UserGreeting />;
} else {
return <GuestGreeting />;
}
ReactDOM.render(
@ -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 <h1>Hello, {formatName(user)}!</h1>;
return <h1>Hello, Stranger.</h1>;
```
@ -16,9 +16,8 @@ We will start with a component called `BoilingVerdict`. It accepts the `celsius`
function BoilingVerdict(props) {
if (props.celsius >= 100) {
return <p>The water would boil.</p>;
return <p>The water would not boil.</p>;