Skip to content

Commit 4a7bdc1

Browse files
authored
fix: the value property of checkbox to the checked property (#7804)
1 parent 73d7073 commit 4a7bdc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/learn/preserving-and-resetting-state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,7 +2011,7 @@ export default function ContactList() {
20112011
<label>
20122012
<input
20132013
type="checkbox"
2014-
value={reverse}
2014+
checked={reverse}
20152015
onChange={e => {
20162016
setReverse(e.target.checked)
20172017
}}
@@ -2110,7 +2110,7 @@ export default function ContactList() {
21102110
<label>
21112111
<input
21122112
type="checkbox"
2113-
value={reverse}
2113+
checked={reverse}
21142114
onChange={e => {
21152115
setReverse(e.target.checked)
21162116
}}

0 commit comments

Comments
 (0)