React Forms Quiz

Test your knowledge of React forms, controlled inputs, uncontrolled inputs, validation, and submit handling.

20 questions · free · answers explained

Start the quiz

All questions in this quiz

  1. What is a controlled input in React?
  2. Which props are commonly used for a controlled text input?
  3. What happens if you pass value to an input without updating it in onChange?
  4. What is an uncontrolled input in React?
  5. Which prop sets the initial value of an uncontrolled text input?
  6. Which prop controls whether a checkbox is checked?
  7. Why should controlled input state usually start as an empty string instead of undefined?
  8. What is the purpose of event.preventDefault in a React form submit handler?
  9. Which event handler is commonly used to handle a React form submission?
  10. What does the name attribute provide in a standard form field?
  11. How should a controlled select element usually store the selected option?
  12. What is a common way to handle several controlled fields with one change handler?
  13. Why might a file input be treated as uncontrolled?
  14. Where is simple client-side form validation often performed in React?
  15. What does disabled on a submit button commonly communicate?
  16. Why can controlled forms become slow in very large components?
  17. Which approach can help reduce unnecessary form re-rendering?
  18. When is an uncontrolled input a reasonable choice?
  19. Which API can read values from form fields during submission?
  20. What should a button that is not meant to submit a form usually specify?

Prefer to read first? React interview questions with written answers.