The current state of PointOfSaleDashboardView Is driven by multiple @Published booleans within PointOfSaleDashboardViewModel:
@Published var isInitialLoading: Bool = false
@Published var isError: Bool = false
@Published var isEmpty: Bool = false
While this currently works as expected, these states are mutually exclusive so it would make more sense to design as a single enum within the view model, so we do not risk to be in an incorrect state where two of more could be true at the same time. Eg:
enum DashboardState {
case empty
case initialLoading
case error
...
}
The current state of
PointOfSaleDashboardView
Is driven by multiple@Published
booleans withinPointOfSaleDashboardViewModel
:While this currently works as expected, these states are mutually exclusive so it would make more sense to design as a single enum within the view model, so we do not risk to be in an incorrect state where two of more could be
true
at the same time. Eg: