Skip to content

Commit fcaaf61

Browse files
Separate into component
1 parent 7dbdb85 commit fcaaf61

File tree

1 file changed

+10
-2
lines changed
  • 1-exercise-solutions/lesson-04

1 file changed

+10
-2
lines changed

1-exercise-solutions/lesson-04/4d.html

+10-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@
3939

4040
<script src="https://unpkg.com/supersimpledev/babel.js"></script>
4141
<script type="text/babel">
42-
function App() {
42+
function LoginForm() {
4343
return (
4444
<>
45-
<p className="title">Hello, welcome to my website</p>
4645
<div>
4746
<input
4847
placeholder="Email"
@@ -62,6 +61,15 @@
6261
);
6362
}
6463

64+
function App() {
65+
return (
66+
<>
67+
<p className="title">Hello, welcome to my website</p>
68+
<LoginForm />
69+
</>
70+
);
71+
}
72+
6573
const container = document.querySelector('.js-container');
6674
ReactDOM.createRoot(container).render(<App />);
6775
</script>

0 commit comments

Comments
 (0)