-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
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
});
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers