Skip to content

Commit

Permalink
update (frameworks/react): decomposing the example
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche committed Aug 22, 2024
1 parent 372af9a commit 877ff41
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
22 changes: 22 additions & 0 deletions frameworks/react/1-basic-raw/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>React App</title>
</head>
<body>
<div id="root"></div>

<script src="https://unpkg.com/react/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script>

<script>
const { createRoot } = ReactDOM;
const { createElement } = React;
const root = createRoot(document.getElementById('root'));
root.render(
createElement('h1', null, 'The dinosaur jumped into the mud.')
);
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>React App</title>
</head>
<body>
Expand All @@ -16,7 +15,7 @@
const { createRoot } = ReactDOM;
const root = createRoot(document.getElementById('root'));
root.render(
<button>Hello React!</button>
<h1>The dinosaur jumped into the mud.</h1>
);
</script>
</body>
Expand Down

0 comments on commit 877ff41

Please sign in to comment.