diff --git a/code/11-applying-our-hook-and-knowledge/src/components/BasicForm.js b/code/11-applying-our-hook-and-knowledge/src/components/BasicForm.js index 66f627e0b7..80e08cb9a2 100644 --- a/code/11-applying-our-hook-and-knowledge/src/components/BasicForm.js +++ b/code/11-applying-our-hook-and-knowledge/src/components/BasicForm.js @@ -69,10 +69,10 @@ const BasicForm = (props) => { {firstNameHasError &&

Please enter a first name.

}
- + {
- + { if (action.type === 'RESET') { return { isTouched: false, value: '' }; } - return inputStateReducer; + return initialInputState; }; const useInput = (validateValue) => {