diff --git a/docs/index.md b/docs/index.md index e1550ef85d..0887052f5e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -107,10 +107,10 @@ render(( #### Form submission -You can pass a function as the `onSubmit` prop of your `Form` component to listen to when the form is submitted and its data are valid. It will be passed a result object having a `formData` attribute, which is the valid form data you're usually after: +You can pass a function as the `onSubmit` prop of your `Form` component to listen to when the form is submitted and its data are valid. It will be passed a result object having a `formData` attribute, which is the valid form data you're usually after. The original event will also be passed as a second parameter: ```js -const onSubmit = ({formData}) => console.log("Data submitted: ", formData); +const onSubmit = ({formData}, e) => console.log("Data submitted: ", formData); render((