scrimba
Frontend Career Path
React basics
React site
Thought experiment: use .append() instead of ReactDOM.render()?
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Thought experiment: use .append() instead of ReactDOM.render()?
AboutCommentsNotes
Thought experiment: use .append() instead of ReactDOM.render()?
Expand for more info
index.js
run
preview
console
import React from "react"

/**
Challenge: find out what happens if we try to append JSX
to our div#root using .append() instead of ReactDOM

1. Create a sample page in JSX (≥ 4 elements) and save them in a variable
2. Select the div with the ID of "root" and use `.append()` to append
your JSX
3. See if you can guess what will show up in the browser before running
the code
4. See if you can explain what actually shows up in the browser
*/

Console
/index.html
-5:28