Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(signals): add enabled function to withCalls config #135

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

gabrielguerrero
Copy link
Owner

New enabled function in withCalls config allows to skip the call under certain user defined conditions like when params are null, or result was already cached

fix #134

@gabrielguerrero
Copy link
Owner Author

@francobasilico not sure if I am happy with the name enabled. Maybe enabledWhen enabledOn, or cancelOn, or skipOn

@corentinclichy
Copy link

Nice addition :)

@francobasilico
Copy link
Collaborator

francobasilico commented Sep 18, 2024

Hey @gabrielguerrero I'm tempted to go with the "negative" approach. Basically indicate via a function when to "disable".

On that note, what do you think about skipWhile? My inspiration is the rxjs operator
https://rxjs.dev/api/operators/skipWhile

@gabrielguerrero
Copy link
Owner Author

Maybe skipWhen or skipIf ? I'm not sure about the while bit because people might think is a loop or a stream of data like in skipWhile

@francobasilico
Copy link
Collaborator

Maybe skipWhen or skipIf ? I'm not sure about the while bit because people might think is a loop or a stream of data like in skipWhile

I Like skipWhen

@gabrielguerrero gabrielguerrero force-pushed the feat/withCalls-enabled-fn branch from d4c7b27 to 90d6922 Compare September 18, 2024 18:41
New skipWhen function in withCalls config allows to skip the call under certain user defined
conditions like when params are null, or result was already cached

fix #134
@gabrielguerrero gabrielguerrero force-pushed the feat/withCalls-enabled-fn branch from 90d6922 to 1716923 Compare September 18, 2024 18:51
@gabrielguerrero gabrielguerrero merged commit ec09537 into main Sep 18, 2024
2 checks passed
Copy link

🎉 This PR is included in version 18.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New withCalls enabled prop
3 participants