Intro
https://scrimba.com/learn/learnreact
Imperative vs Declarative (How vs What)
imperative
(how)
const h1 = document.createElement("h1")
h1.textContent = "Hello world"
h1.className = "header"
console.log(h1)
declarative
(what)
// JSX
ReactDOM.render(<h1>This is JSX</h1>, document.getElementById("root"))
Generally, “declarative” programming is preferred, and they cause fewer bugs.

Leave a Reply