Skip to content

Commit

Permalink
basic reactDOM rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
aviralrabbit1 committed Sep 12, 2023
1 parent ca60425 commit d2ed690
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<title>Notes App</title>
</head>
<body>
<div id="app">
App inside div
</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>
<!-- The crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements,
Expand Down
7 changes: 6 additions & 1 deletion scripts/app.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
console.log('App is running');
console.log('App is running');

var template = <h1>JSX is rendering</h1>;
var appRoot = document.getElementById('app');

ReactDOM.render(template, appRoot);

0 comments on commit d2ed690

Please sign in to comment.