Skip to content

Commit

Permalink
Apply computed suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Sep 3, 2022
1 parent 73a6fd2 commit c14d2b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Note that you shold only use `signal.peek()` if you really need it. Reading a si

### `computed(fn)`

A good portion of data is typically derived from existing pieces. With `computed` you can combine multiple signals into a new one that can be reacted to.
Data is often derived from other pieces of existing data. The `computed` function lets you combine the values of multiple signals into a new signal that can be reacted to, or even used by additional computeds. When the signals accessed from within a computed callback change, the computed callback is re-executed and its new return value becomes the computed signal's value.

```js
import { signal, computed } from "@preact/signals-core";
Expand Down

0 comments on commit c14d2b5

Please sign in to comment.