Dependency Injection via Property Wrappers

Property Wrappers in Swift allow us to add a layer of separation between code that manages how a property is stored and the code that defines a property. It's a powerful feature with a lot of potential use cases. Dependency injection is a software engineering technique used to supply dependencies to an object or value type. In this post, Kilo Loco demonstrates how we can use Swift property wrappers to pass dependencies to a SwiftUI view. It's a cool idea.