React Dojo

Search

Search concepts, exercises and quizzes

Quiz

Forms

10 questions

Controlled inputs, form events, and submit handling

01What does e.preventDefault() do in a form's onSubmit handler?
02Why is an input with value={text} but no onChange problematic?
03What is the difference between value and defaultValue on an input?
04How is a controlled checkbox correctly handled in React?
05How do you read all values from an uncontrolled form on submit?
06When does it make sense to use an uncontrolled form over a controlled one?
07How do you reset a controlled form to its initial values?
08How do you handle multiple controlled inputs without one useState per field?
09What event is used to detect changes in a controlled <select>?
10How do you disable the submit button while the form has validation errors?
Was this helpful?
Sign in to give feedback