diff --git a/practice/index.html b/practice/index.html new file mode 100644 index 0000000..479201a --- /dev/null +++ b/practice/index.html @@ -0,0 +1,37 @@ + + + + + + + React App + + + + + + + + + + + + + +
+ + diff --git a/practice/main.js b/practice/main.js new file mode 100644 index 0000000..9372cd7 --- /dev/null +++ b/practice/main.js @@ -0,0 +1,14 @@ +import React from "react"; +import { ReactDOM } from "react-dom"; + +// To get the root element from the HTML document +const rootElement = document.querySelector(".root"); + +// JSX element, header +const header =

Welcome to react

; + +// JSX element, app +const app =
{header}
; + +// we render the JSX element using the ReactDOM package +ReactDOM.render(app, rootElement); diff --git a/practice/style.css b/practice/style.css new file mode 100644 index 0000000..e69de29