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
Currently, signals only evaluate their dependents if a change is detected in the signal value. Something is considered a change if the value is different or, in the case of an object, if the isEqual function deems it different.
There are cases when we want for dependents to reevaluate no matter what, any time that the signal's setter is called. This can be to override the isEqual check, or simply because we want to force trigger a dependent (for example, to rerun an effect, or to update a stale resource by forcing it to go to the DB).
Proposal
Add a force flag to the signal on creation. When on then the signal's setter will bypass the equality check and always notify its dependents that something changed.
$signal(0, {
force: true
});
The text was updated successfully, but these errors were encountered:
Currently, signals only evaluate their dependents if a change is detected in the signal value. Something is considered a change if the value is different or, in the case of an object, if the
isEqual
function deems it different.There are cases when we want for dependents to reevaluate no matter what, any time that the signal's setter is called. This can be to override the
isEqual
check, or simply because we want to force trigger a dependent (for example, to rerun an effect, or to update a stale resource by forcing it to go to the DB).Proposal
Add a
force
flag to the signal on creation. When on then the signal's setter will bypass the equality check and always notify its dependents that something changed.The text was updated successfully, but these errors were encountered: