Skip to content

Commit

Permalink
React From Scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
15Dkatz committed Oct 19, 2022
1 parent 21e873f commit a1de8ca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions starter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Starter React</title>
</head>
<body>
<div id="root"></div>
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="index.js"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions starter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
console.log('hi');

const element = React.createElement('div', null, 'React element!');

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(element);

0 comments on commit a1de8ca

Please sign in to comment.