Skip to content

Commit 2a9c399

Browse files
author
Vlad Balin
committed
fixed docs
1 parent 3a3339a commit 2a9c399

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,34 @@ var list = phonebookLink.map( itemLink => (
1313
<input valueLink={ itemLink.at( 'name' ) } />
1414
</div>
1515
));
16-
```
17-
16+
```
1817

1918
# Installation
2019

2120
`npm install valuelink`
2221

23-
MIT License.
22+
CommonJS module, MIT License.
2423

2524
# API
2625

2726
## Create link
2827

29-
- Create link to react component's state attribute
28+
- Create link to react component's state attribute:
3029

3130
```javascript
3231
var nameLink = Link.state( this, 'name' );
3332
```
3433

35-
- Create custom link
34+
- Create custom link:
3635

3736
```javascript
3837
var customLink = new Link( this.value, x => this.value = x );
3938
```
4039

4140
## Update link
4241

43-
- update linked value
42+
- Update linked value:
43+
4444
```javascript
4545
<button onClick={ link.update( x => x + 1 ) } />
4646
```
@@ -55,7 +55,8 @@ MIT License.
5555

5656
## Links validation
5757

58-
- Simple asserts
58+
- Simple asserts:
59+
5960
```javascript
6061
var numLink = List.state( this, 'num' )
6162
.check( x => x >= 0 && x <=5 );

0 commit comments

Comments
 (0)