Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ const BasicForm = (props) => {
{firstNameHasError && <p className="error-text">Please enter a first name.</p>}
</div>
<div className={lastNameClasses}>
<label htmlFor='name'>Last Name</label>
<label htmlFor='lastName'>Last Name</label>
<input
type='text'
id='name'
id='lastName'
value={lastNameValue}
onChange={lastNameChangeHandler}
onBlur={lastNameBlurHandler}
Expand All @@ -81,10 +81,10 @@ const BasicForm = (props) => {
</div>
</div>
<div className={emailClasses}>
<label htmlFor='name'>E-Mail Address</label>
<label htmlFor='email'>E-Mail Address</label>
<input
type='text'
id='name'
id='email'
value={emailValue}
onChange={emailChangeHandler}
onBlur={emailBlurHandler}
Expand Down
2 changes: 1 addition & 1 deletion code/12-finished/src/hooks/use-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const inputStateReducer = (state, action) => {
if (action.type === 'RESET') {
return { isTouched: false, value: '' };
}
return inputStateReducer;
return initialInputState;
};

const useInput = (validateValue) => {
Expand Down