Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 8, 2021
1 parent 6e155fb commit 13d251d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ let c = sum(a, b) // c = a + b = 3

set(a, 2) // shorthand for a.value = 2

log(c) // it's 4!
log(c) // it's 4 (2 + 2)!
```

### Cool, but, but how is that possible?
### Cool, but, how is that possible?

We are basically making functions accepting [`Ref`](https://v3.vuejs.org/api/refs-api.html#refs) as their arguments and then wrapper their result with [`computed`](https://v3.vuejs.org/guide/reactivity-computed-watchers.html#computed-and-watch). This makes them automatically collect dependency sources and re-evaluate when the sources get changed. Note that the `ComputedRef` is also a `Ref` which means the operations are chainable!

Expand Down

0 comments on commit 13d251d

Please sign in to comment.