October 2019
Intermediate to advanced
426 pages
11h 49m
English
The Register component works similarly to the Login component. However, it has three input fields: Username, Password, and Repeat Password.
Let's implement Input Hooks in the Register component now:
import { useInput } from 'react-hookedup'
const [ username, setUsername ] = useState('') const [ password, setPassword ] = useState('') const [ passwordRepeat, setPasswordRepeat ] = useState('')
They are replaced with the corresponding Input Hooks:
const { value: username, bindToInput: bindUsername } = useInput('') const { value: password, bindToInput: bindPassword } = useInput('') const { value: passwordRepeat, ...Read now
Unlock full access