Usecases is not used?
lienminhquang opened this issue · 2 comments
lienminhquang commented
I saw that you are using repositories in the bloc instead of usecases. (The usecases are not used anywhere in this project).
Can someone explain to me why?
hungps commented
Hi @lienminhquang,
In this repository, I use BloC's actions/events as a replacement for the usecases layer because, in my opinion, they share the same role. If I use the normal setState
instead of BloC, I will definitely add the usecases layer to my structure.
And of course, you can still add the usecases layer between BloC and repositories to share the usecases throughout your BloCs if that is what your project required
lienminhquang commented
Thank you @hungps. In my projects, the role of BloC and Usecase is also the same.