Update 09.2-form-input-binding-sugar.md
Add better explanation for 2-way data binding to checkboxes using `checkedLink`. As mentionned here: https://github.com/facebook/react/issues/1930
Sébastien Lorber committed
Jul 29, 2014 at 16:14 UTC
b9a0c27914ef60dd91657f8d25c92dcf870c5bc8
1 file changed
+5
-1
docs/docs/09.2-form-input-binding-sugar.md
+5
-1
@@ -66,7 +66,11 @@ var WithLink = React.createClass({
66
67
`ReactLink` objects can be passed up and down the tree as props, so it's easy (and explicit) to set up two-way binding between a component deep in the hierarchy and state that lives higher in the hierarchy.
68
69
-Note that `<input>` supports ReactLink for both `value` and `checked`.
69
+Note that `<input>` supports ReactLink for both `value` and `checked`. For checkboxes, you should use `checkedLink` instead of `valueLink`, as their value is fixed to `on`:
70
+```
71
+<input type="checkbox" checkedLink=valueLink={this.linkState('booleanValue')} />
72
+```
73
+
74
75
## Under the Hood
76