File tree Expand file tree Collapse file tree
src/routes/reference/basic-reactivity Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments