Seeking best practices for using global Toast view in TCA. #2196
Jinya
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Hi @Jinya, the code you have sketched out is precisely how we would approach the problem ourselves. |
Beta Was this translation helpful? Give feedback.
1 reply
-
We pretty much take the same approach. A pub/sub style client as a dependency is a great way to model the use case where multiple domains throughout your app need to communicate with some other domain somewhere. I’m curious how you’re handling the UI side of this - our current toast UI doesn’t work with modal sheets currently (the toast appears behind them). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some dilemma regarding using an unified styling Toast view in SwiftUI.
I have considered two approaches:
I chose the second way and write a dependency called
ToastPresenter
, below is the sample implementation codes.I'm not sure if there is a better implementation or some best practice in TCA to show toast view. Please let me know your suggestions and approaches.
Beta Was this translation helpful? Give feedback.
All reactions