Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

deriveAsync with requiredSync is not lazy #561

Open
ShacharHarshuv opened this issue Feb 12, 2025 · 0 comments
Open

deriveAsync with requiredSync is not lazy #561

ShacharHarshuv opened this issue Feb 12, 2025 · 0 comments

Comments

@ShacharHarshuv
Copy link
Contributor

ShacharHarshuv commented Feb 12, 2025

When using deriveAsync with requireSync: true I still expect it to only run the computation once there is a usage (consumer) for the signal, which is how it works with angular built in computed, but it runs the computation immediately when derivedAsync is called.

A common usecase where this would be a problem is if the derivedAsync rely on the value of a required input signal.

@ShacharHarshuv ShacharHarshuv changed the title deriveAsync with requiredSync: true is not lazy deriveAsync with requiredSync is not lazy Feb 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant