Skip to content

Commit 7353a15

Browse files
author
Sanajt Jana
committed
make understandabale comment
1 parent 9db3cd2 commit 7353a15

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/App.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
import { useState, React } from "react";
22

33
const App = () => {
4-
//fullname
5-
const [FullnameValue, setFullnameValue] = useState("");
6-
const [FullNameView, setFullNameView] = useState("");
4+
//name load state
5+
const [nameValue, setnameValue] = useState("");
6+
const [NameView, setNameView] = useState("");
77

8-
//email
8+
//email load state
99
const [EmailValue, setEmailValue] = useState("");
1010
const [EmailView, setEmailView] = useState("");
1111

12-
//fullname fucn
13-
const fullnameFucn = (fullnameValue) => {
14-
setFullnameValue(fullnameValue.target.value);
12+
//name event fucn
13+
const nameFucn = (nameValue) => {
14+
setnameValue(nameValue.target.value);
1515
};
1616

17-
//email fucn
17+
//email event fucn
1818
const emailFucn = (emailValue) => {
1919
setEmailValue(emailValue.target.value);
2020
};
2121

2222
//button click fucn
2323
const onSubmit = () => {
24-
setFullNameView(FullnameValue);
24+
setNameView(nameValue);
2525
setEmailView(EmailValue);
2626
};
2727

2828
return (
2929
<>
3030
<div className="container text-center" style={{ paddingTop: "20%" }}>
31-
<h1>Hi, {FullNameView}</h1>
31+
<h1>Hi, {NameView}</h1>
3232
<h6>{EmailView}</h6>
3333
<div className="pt-3 pb-3">
3434
<input
3535
type="text"
36-
placeholder="Full name"
37-
onChange={fullnameFucn}
38-
value={FullnameValue}
36+
placeholder="Enter name"
37+
onChange={nameFucn}
38+
value={nameValue}
3939
/>
4040
<br />
4141
<br />
4242
<input
4343
type="email"
44-
placeholder="Email"
44+
placeholder="Enter email"
4545
onChange={emailFucn}
4646
value={EmailValue}
4747
/>

0 commit comments

Comments
 (0)