-
Notifications
You must be signed in to change notification settings - Fork 0
useInput
Nick Wylynko edited this page Nov 17, 2022
·
1 revision
import { useInput } from "react-raw-hooks/hooks/useInput"
const App = () => {
const input = useInput()
const handleClick = () => {
console.log(input.value)
}
return (
<>
<input {...input} />
<button onClick={handleClick}>Continue</button>
</>
)
}
const App = () => {
const name = useInput()
const email = useInput()
const handleClick = () => {
console.log(name.value, email.value)
}
return (
<>
<input {...name} />
<input {...email} />
<button onClick={handleClick}>Continue</button>
</>
)
}