-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (36 loc) · 803 Bytes
/
index.js
File metadata and controls
41 lines (36 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import ReactDOM from "react-dom";
import Test from "./test";
import InputParent from "./inputParent";
const App = ({ children }) => {
return (
<div
style={{
backgroundColor: "purple",
borderRadius: "50%",
display: "flex",
wrap: "nowrap"
}}
>
<h1>Welcome to my app</h1>
{children}
</div>
);
};
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<App>
<Test />
<InputParent />
</App>
);
// const root = ReactDOM.createRoot(document.getElementById("root"));
// function tick() {
// const element = (
// <div>
// <h1>Hello, world!</h1>
// <h2>It is {new Date().toLocaleTimeString()}.</h2>
// </div>
// );
// root.render(element);
// }
// setInterval(tick, 1000);