Skip to content

Commit faa3ee2

Browse files
committed
Update cursor docs
1 parent 995a00d commit faa3ee2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,15 @@ libraries like [React](http://facebook.github.io/react/) or to simulate
304304

305305
```javascript
306306
var data = Immutable.fromJS({ a: { b: { c: 1 } } });
307-
var cursor = data.cursor(['a', 'b', 'c'], newData => {
307+
var cursor = data.cursor(['a', 'b'], newData => {
308308
data = newData;
309309
});
310310

311311
// ... elsewhere ...
312312

313-
cursor.deref(); // 1
314-
cursor = cursor.update(x => x + 1);
315-
cursor.deref(); // 2
313+
cursor.get('c'); // 1
314+
cursor = cursor.update('c', x => x + 1);
315+
cursor.get('c'); // 2
316316

317317
// ... back to data ...
318318

0 commit comments

Comments
 (0)