ngxtension / ngxtension-platform

Utilities for Angular
https://ngxtension.netlify.app/
MIT License
592 stars 87 forks source link

Suggestion: explicitEffect - allow non-array signal parameter #492

Open mmorgan4x opened 1 month ago

mmorgan4x commented 1 month ago

allow explicitEffect to accept a non-array signal parameter

const count = signal(0);
explicitEffect(count, t => {  console.log(`count updated ${t}`) });

instead of

const count = signal(0);
explicitEffect([count], ([t]) => {  console.log(`count updated ${t}`) });
eneajaho commented 1 month ago

@JeanMeche should we add this? This came up during initial exploration phase btw, but we decided against it.