Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-11 01:10:12 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bcd04b68e5cdd44365b97cb18a0f9eda16e5ea3f
bcd04b68
1 parent
65858f2f
create useInput
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
front/src/Hooks/useInput.js
front/src/Hooks/useInput.js
0 → 100644
View file @
bcd04b6
1
+
import
{
useState
}
from
"react"
;
2
+
3
+
export
default
(
defaultValue
)
=>
{
4
+
const
[
value
,
setValue
]
=
useState
(
""
);
5
+
6
+
const
onChange
=
(
e
)
=>
{
7
+
const
{
8
+
target
:
{
value
},
9
+
}
=
e
;
10
+
setValue
(
value
);
11
+
};
12
+
13
+
return
{
value
,
onChange
};
14
+
};
Please
register
or
login
to post a comment