Excellent work. 🌟
Only thing I would do differently is to create a resuable function for storing your form state.
You use the following pattern:
//useState declearation const [email, setEmail] = useState('') const [password, setPassword] = useState('') //in the JSX part of the component <input type="text" onChange={e => setEmail(e.target.value)} />
Which could be upgraded to:
const [formState, setFormState] = useState({}) const updateFormState = (field,value) => { const newState = { [`${field}`]:value, ...formState } setFormState(newState) } //JSX <input type="text" onChange={e => updateFormState("email",e.target.value)} />
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Excellent work. 🌟
Only thing I would do differently is to create a resuable function for storing your form state.
You use the following pattern:
Which could be upgraded to: