RxSwift: Reactive Programming with Swift
RxSwift: Reactive Programming with Swift
Summary:
Introduction
The book "RxSwift: Reactive Programming with Swift" by the Raywenderlich team is one of the most comprehensive and practical guides to reactive programming in the Apple ecosystem. Released in 2021 (fourth edition), it spans 534 pages and covers all key aspects of working with the RxSwift library. Despite the fact that the PythonLib website is dedicated to Python, this book will be useful for developers who want to broaden their horizons and understand the reactive programming paradigm, which is also actively used in Python (for example, RxPY).
What is this book about?
The book is dedicated to reactive programming using the RxSwift framework — the Swift implementation of ReactiveX (Reactive Extensions). The authors consistently introduce the reader to the core concepts: Observable, Observer, Subject, Scheduler, transformation operators, filtering, and combining data streams. Special attention is paid to integrating RxSwift with UIKit, SwiftUI, and working with network requests (URLSession).
Who is this book for?
The book is intended for iOS/macOS developers who already have basic experience with Swift and Xcode. It will be difficult for programming beginners, but if you are confident in writing Swift and want to transition to a reactive style — this is an ideal start. The book will also be useful for Python developers familiar with RxPY for comparing approaches.
What will the reader learn?
- Basics of reactive programming: Observable, Observer, DisposeBag.
- Working with Subject (PublishSubject, BehaviorSubject, ReplaySubject).
- Transformation operators (map, flatMap, scan) and filtering operators (filter, distinctUntilChanged).
- Combining streams (combineLatest, zip, merge).
- Managing multithreading with Schedulers.
- Integrating RxSwift with UIKit (RxCocoa) and SwiftUI.
- Error handling and resubscriptions (retry, catch).
- Testing reactive code.
- Practical examples: search autocomplete, timers, network requests.
Strengths of the book
Practical focus. Each chapter contains code examples and exercises. You don't just read theory; you write code immediately. Structured approach. The material is divided into logical blocks: from simple to complex. Relevance. The fourth edition (2021) covers Swift 5 and the latest versions of RxSwift. Author team. Raywenderlich is renowned for high-quality tutorials — the book is written in a lively, understandable language. Community support. On the Raywenderlich forum, you can ask questions about the book.
Who is it recommended for?
The book is a must-read for all iOS developers who want to master the reactive approach. I also recommend it to Python developers who work with asynchrony and want to understand how the same principles are implemented in Swift. If you write in Python and use RxPY, this book will help deepen your understanding of reactive patterns.
Overall, "RxSwift: Reactive Programming with Swift" is a high-quality textbook that justifies its price and will become a desktop book for many iOS developers.