SwiftUI - @Published

The @Published attribute is a property wrapper that allows access to a Publisher type using either the $ syntax or the projectedValue struct property. @propertyWrapper public struct Published<Value> { ///...

Functional Reactive Programming - Future and Single

While Publisher and Observable are designed to deliver an infinite stream of elements over time, Combine and RxSwift provides with variations of these protocols to model any cases where we...

Functional Reactive Programming - Publisher and Observable

RxSwift and Combine are reactive programming solutions whose purpose is to handle asynchronous events. RxSwift is the most popular framework whereas Combine is Apple’s recently introduced built-in solution. Dealing with...

Swift - KeyPaths

Introduced with Swift 4, the KeyPath type is a powerful feature that enables us to store a type’s property and defer its evaluation. public class KeyPath<Root, Value>: PartialKeyPath<Root> { @usableFromInline...

Swift - @autoclosure

While closures are a powerful way to capture and store references within a specific context, the heavy-weight syntax using curly brackets may sometimes lead to confusion and code misinterpretation. The...