-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c311ac
commit 42df87e
Showing
2 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
|
||
const parent = React.createElement ("div", { id: "parent" }, [ | ||
React.createElement("div", { id: "child" }, [ | ||
React.createElement("h1", {}, "HEllo"), | ||
React.createElement("h2", {}, "Dawson"), | ||
]), | ||
React.createElement("div", { id: "child?" }, [ | ||
React.createElement("h1", {}, "Richey"), | ||
React.createElement("h2", {}, "I'm an h2 tag"), | ||
]), | ||
]); | ||
|
||
React.createElement("h1", {id:"heading", special:"mine"}, "hello world, from dawson"); | ||
|
||
console.log(parent); //object | ||
// console.log(heading); //object | ||
// const parent = React.createElement ("div", { id: "parent" }, [ | ||
// React.createElement("div", { id: "child" }, [ | ||
// React.createElement("h1", {}, "HEllo"), | ||
// React.createElement("h2", {}, "Dawson"), | ||
// ]), | ||
// React.createElement("div", { id: "child?" }, [ | ||
// React.createElement("h1", {}, "Richey"), | ||
// React.createElement("h2", {}, "I'm an h2 tag"), | ||
// ]), | ||
// ]); | ||
|
||
const root = ReactDOM.createRoot(document.getElementById("root")); | ||
// React.createElement("h1", {id:"heading", special:"mine"}, "hello world, from dawson"); | ||
|
||
root.render(parent); | ||
// root.render(heading); | ||
// console.log(parent); //object | ||
// // console.log(heading); //object | ||
|
||
// const root = ReactDOM.createRoot(document.getElementById("root")); | ||
|
||
// root.render(parent); | ||
// // root.render(heading); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters