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

docs: data streams strategy #92

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

k1rill
Copy link
Contributor

@k1rill k1rill commented Nov 15, 2023

Added data streams strategy in docs

@volodymyr-chekyrta
Copy link
Contributor

Not sure about the meaning of asynchronous data streams, but in general idea looks good to me 👍

@HamzaIsrar12 HamzaIsrar12 self-requested a review November 16, 2023 23:34
@HamzaIsrar12
Copy link
Contributor

The idea seems quite promising. ✨ 🚀

To enhance it further, we can also include the recommended approach for collecting flows in the UI. Specifically, the repeatOnLifecycle(Lifecycle.State.STARTED) block as mentioned in the docs. 🏎️

Or would it be an overkill? 🤔

@k1rill
Copy link
Contributor Author

k1rill commented Nov 17, 2023

The idea seems quite promising. ✨ 🚀

To enhance it further, we can also include the recommended approach for collecting flows in the UI. Specifically, the repeatOnLifecycle(Lifecycle.State.STARTED) block as mentioned in the docs. 🏎️

Or would it be an overkill? 🤔

@HamzaIsrar12, the main point of this strategy is to move from LiveData on the presentation level. In the most cases now there is a Compose UI, so to collect changes from flows I think we will use collectAsState inside composable.

But if we will use flows in repositories or interactors, or in the xml layouts, the idea is brilliant.

So as for now, I think we don't have a rush to add repeatOnLifecycle in this strategy. But we can keep this in mind during code reviews or for the future strategies. cc @volodymyr-chekyrta

@volodymyr-chekyrta volodymyr-chekyrta merged commit ffe1431 into openedx:develop Nov 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants