toggl / komposable-architecture

🏗️ Kotlin implementation of Point-Free's composable architecture
Apache License 2.0
280 stars 20 forks source link

⏲️ Add the Effect.debounce extension #75

Closed daividssilverio closed 6 months ago

daividssilverio commented 6 months ago

Summary

This PR is adding a simpler way to make debounce-able Effects.

Relationships

Closes #66

Technical considerations

You might wonder about the delay I'm adding in the extension. That's added to simulate the plain flow's debounce behavior in our effects. Without it, immediate effects wouldn't respect the debounce and would fire immediately after being started; only effects with some actual work would get debounced and only if they took more time than the next event got fired.

Tests

✅ ✅ ✅

Review pointers

Try the sample app; Review the extension itself and check the tests.