clean-architecture
Keep in mind that dismissal is largely imperative and fragile. Like manually popping views off the navigation path, it depends on an assumption of how the app is constructed and what views have been pushed and presented.
That’s not much of a problem if you’re coming at it from the application root side during a deep link. But it can be one if you’re... See more
That’s not much of a problem if you’re coming at it from the application root side during a deep link. But it can be one if you’re... See more
SwiftUI Navigation With Dismissible
a dismissible view is a presented view that Navigator knows how to dismiss .
SwiftUI Navigation With Dismissible
Each enumerated value is a view. Evaluate the enumeration and the value’s body switch returns the view we need.
SwiftUI: Eliminating Navigation Registration
What’s the state of the art for dependency injection libraries? All the ones I looked at use the experimental decorators, and I’m not sure how well that’s going to play with the newer ecmascript decorators coming soon.
Is there another option or should I just use tsyringe?
reddit.comDiscussion on pragmatic dependency injection
Conforming to these simple rules is not hard, and will save you a lot of headaches going forward. By separating the software into layers, and conforming to The Dependency Rule , you will create a system that is intrinsically testable, with all the benefits that implies.
Robert C. Martin (Uncle Bob) • Clean Coder Blog
Dependency rule: as you you go into circle, abstraction level increases and nothing in inner circle knows about outer circle
For a good code design it's very important to use proper abstractions because they make our code loosely coupled . That means that different componenets of our code can be replaced with alternative implementations without affecting other components. When our code is loosely coupled it becomes easier to test, easier to extend, easier to reuse,... See more
Dependency Injection (DI) in Swift
Loosely coupled code is the main goal of Dependency Injection. It enables us to write loosely coupled code.
Dependency Injection (DI) in Swift
Instead, they forward the result to the AppState or a Binding provided by the View.
The Binding is used when the result of work (the data) is owned locally by one View and does not belong to the central AppState , that is, it doesn’t need to be persisted or shared with other screens of the app.
The Binding is used when the result of work (the data) is owned locally by one View and does not belong to the central AppState , that is, it doesn’t need to be persisted or shared with other screens of the app.
Alexey Naumov • Clean Architecture for SwiftUI
“or a binding provided by the view”
No other layers know about the View layer existence, so there is no need to hide it behind a protocol.