August 2017
Beginner
374 pages
10h 41m
English
Now that we have JSX set up, let's use it! Edit src/index.js and replace the following line:
React.createElement('h1', {}, 'hello world!')
With the JSX version:
<h1>hello world!</h1>
The whole file should look like this now:
import React from 'react'
import ReactDOM from 'react-dom'
ReactDOM.render(
<h1>hello world!</h1>,
document.getElementById('root')
)
Restart the application and visit http://localhost:8080/; it should look the same way as before.
Read now
Unlock full access