|
|
|
@ -135,13 +135,13 @@ ReactDOM.render(
|
|
|
|
JSX can be split onto multiple lines:
|
|
|
|
JSX can be split onto multiple lines:
|
|
|
|
|
|
|
|
|
|
|
|
```JavaScript
|
|
|
|
```JavaScript
|
|
|
|
const formatLocation = function(location){
|
|
|
|
const formatUser = function(user){
|
|
|
|
return location + "!!"
|
|
|
|
return user + "!!"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const location = "Matt";
|
|
|
|
const user = "Matt";
|
|
|
|
const myJSX =
|
|
|
|
const myJSX =
|
|
|
|
<section>
|
|
|
|
<section>
|
|
|
|
<h1>Hello, {formatLocation(location)}</h1>
|
|
|
|
<h1>Hello, {formatUser(user)}</h1>
|
|
|
|
Welcome to the app
|
|
|
|
Welcome to the app
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|