You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, signals use reference equality (`===`).
88
-
A custom comparison function to determine when the signal should update.
89
-
If set to `false`, the signal will always update regardless of value equality.
90
-
This can be useful to create a Signal that triggers manual updates in the reactive system, but must remain a pure function.
81
+
A custom comparison function to determine when the signal should update.
82
+
By default, signals use reference equality (`===`) to compare previous and next values.
83
+
When set to `false`, the signal will always update regardless of value equality, which is useful for creating signals that trigger manual updates in the reactive system.
84
+
85
+
When providing a custom function, it should be pure and return `true` if the values are equal (no update needed) or `false` if they differ (trigger update).
86
+
Impure functions can create unexpected side effects and performance issues.
0 commit comments