Form Actions

Loading "Form Actions"
πŸ‘¨β€πŸ’Ό onSubmit handlers that prevent default and handle file uploads like this are so common that React has a built-in way to do that! The action prop on a form can accept a function! The function accepts a formData object.
Note that in HTML, attributes cannot accept functions. The action prop accepting a function is a React feature.
In this exercise, create a function for logging the formData like we are currently and delete all the superfluous props.
Login to get access to the exclusive discord channel.
  • βš›οΈFundamentals
    First Four Exercises are Free!
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    To make sure this shows up in the fundamentals thread. Isn't it exciting the first four exercises of...
    1 Β· 4 days ago
  • General
    Welcome to EpicReact.dev! Say Hello πŸ‘‹
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    Welcome to the first of many posts in the EpicReact.dev channel! Take a moment to introduce yourself...
    0 Β· 4 days ago