Skip to content

Commit

Permalink
add note about attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed May 6, 2024
1 parent 4f3a9d3 commit 4f7e833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions exercises/07.forms/05.problem.action/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
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.

<callout-warning class="aside">
Note that in HTML, attributes cannot accept functions. The action prop
accepting a function is a React feature.
</callout-warning>

In this exercise, create a function for logging the `formData` like we are
currently and delete all the superfluous props.

Expand Down

0 comments on commit 4f7e833

Please sign in to comment.