Skip to content

Commit c2253ca

Browse files
author
Vlad Balin
committed
Update databinding.md
1 parent e238514 commit c2253ca

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

example/databinding.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Here are the set of examples for typical `nestedreact` data binding use cases.
44

5+
Each section contains custom databound component, model definitions, and usage examples.
6+
7+
Somewhere at the top level component(s) there must be the declaration linking model updates to UI. Either models must be (nested) members of some component's state (which will update UI even in case of deep changes), or you may link component updates to changes of models and collections passed in props. In the last case, you will need to add following line to top or middle-level component definition:
8+
9+
```
10+
listenToProps : 'myModel myCollection'
11+
```
12+
13+
For further information on this topic consult the top-level guide.
14+
515
## Checkboxes
616

717
Standard `<input/>` will work. Custom Checkbox component might be implemented like this:
@@ -204,4 +214,4 @@ const InputGroup = ({ model /* instanceof MyModel */ }) => (
204214
</div>
205215
);
206216
};
207-
```
217+
```

0 commit comments

Comments
 (0)