Skip to content

Commit 55d1f8f

Browse files
Update input.md (#7418)
* Update input.md Fix typo about input * Update src/content/reference/react-dom/components/input.md --------- Co-authored-by: Ricky <rickhanlonii@gmail.com>
1 parent 126d8c9 commit 55d1f8f

File tree

1 file changed

+1
-1
lines changed
  • src/content/reference/react-dom/components

1 file changed

+1
-1
lines changed

src/content/reference/react-dom/components/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Give a `name` to every `<input>`, for example `<input name="firstName" defaultVa
297297

298298
<Pitfall>
299299

300-
By default, *any* `<button>` inside a `<form>` will submit it. This can be surprising! If you have your own custom `Button` React component, consider returning [`<button type="button">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/button) instead of `<button>`. Then, to be explicit, use `<button type="submit">` for buttons that *are* supposed to submit the form.
300+
By default, a `<button>` inside a `<form>` without a `type` attribute will submit it. This can be surprising! If you have your own custom `Button` React component, consider using [`<button type="button">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) instead of `<button>` (with no type). Then, to be explicit, use `<button type="submit">` for buttons that *are* supposed to submit the form.
301301

302302
</Pitfall>
303303

0 commit comments

Comments
 (0)