Skip to content

Commit

Permalink
created custom script commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dawsonrichey committed Oct 20, 2023
1 parent 4c311ac commit 42df87e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
34 changes: 18 additions & 16 deletions example6/App.js
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);
2 changes: 2 additions & 0 deletions example6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "1.0.0",
"description": "Learning React Ep 2",
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html",
"test": "jest"
},
"repository": {
Expand Down

0 comments on commit 42df87e

Please sign in to comment.