Skip to content

Commit a3545df

Browse files
committed
update
1 parent 8b05dad commit a3545df

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/routes/reference/basic-reactivity/create-memo.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ An optional configuration object with the following properties:
7070
- **Type:** `false | ((prev: T, next: T) => boolean)`
7171
- **Required:** No
7272

73-
A function to determine if the memo value has changed.
74-
Defaults to the strict equality (`===`) operator.
73+
A function that runs after each execution of `fn` to determine if the memo value has changed.
74+
It receives the previous and the new value.
75+
If the function returns `true`, the memo does not trigger downstream updates.
7576

76-
- If the function returns `true`, the memo does not trigger downstream updates.
77-
- If set to `false`, the memo triggers updates whenever it re-executes, even if the value appears unchanged.
77+
If set to `false` (instead of a function), the memo triggers updates whenever it re-executes, even if the value is unchanged.
78+
79+
Defaults to a function that compares values using strict equality (`===`).
7880

7981
#### `name`
8082

0 commit comments

Comments
 (0)