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

[FR]: Provide examples of consuming UI events exactly once #52

Open
2 tasks done
StylianosGakis opened this issue May 20, 2022 · 0 comments
Open
2 tasks done

[FR]: Provide examples of consuming UI events exactly once #52

StylianosGakis opened this issue May 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@StylianosGakis
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Since this seems to have become the most up to date modern android development sample, I think it would be a great idea to have it include at least one example of how one-time UI events should be handled. I am referring to this section https://developer.android.com/topic/architecture/ui-layer/events#views_3 from the documentation, which pushes people away from LiveData, Channel and other such approaches. To further assist devs into taking this approach instead, this sample could serve as an example of how to this right in a fully fledged app.

Describe the solution

Particularly it'd be interesting to see handling one-time events like showing something to the screen once and then clearing the state as it's handled, or even more so, consuming events that require the app to navigate somewhere else. In my opinion these are two super common use cases while creating apps that would be great to exist inside the most up-to-date app example provided officially from Google.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@StylianosGakis StylianosGakis added the enhancement New feature or request label May 20, 2022
@tunjid tunjid assigned tunjid and unassigned tunjid Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants