I'm currently working on the task of disentangling the database/Appstate from the CountriesInteractor. However, it appears that the two are closely intertwined. Could you kindly provide some guidance on how to achieve this separation, or if there are any sample examples available without this coupling, that would be greatly appreciated?
I went through the below description and it seems Appstate is available by default
Previously, this app did not use CoreData for persistence, and all loaded data were stored in the AppState.
With the persistence layer in place we have a choice - either to load the DB content onto the AppState, or serve the data from Interactors on an on-demand basis through Binding.
The first option suits best when you don't have a lot of data, for example, when you just store the last used login email in the UserDefaults. Then, the corresponding string value can just be loaded onto the AppState at launch and updated by the Interactor when the user changes the input.
Greetings @nalexn,
I'm currently working on the task of disentangling the database/Appstate from the
CountriesInteractor
. However, it appears that the two are closely intertwined. Could you kindly provide some guidance on how to achieve this separation, or if there are any sample examples available without this coupling, that would be greatly appreciated?I went through the below description and it seems Appstate is available by default