Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Updated - Multiple ids with the same value #138

Open
wants to merge 2 commits into
base: 16-working-with-forms
Choose a base branch
from
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