Skip to content

hoc081098/search-book-MVVM-MVI-RxSwift

Repository files navigation

Search book MVI RxSwift

🌀 Learning ⚡ Search book MVVM / MVI + RxSwift 🌸 Just combine, filter, transform Stream...

Port search-book-flutter-BLoC-pattern-RxDart to Swift + RxSwift + MVVM version

Demo 1 Demo 2

Contributors

Petrus Nguyễn Thái Học

Summary

This app uses the Model-View-Intent architecture and uses RxSwift to implement the reactive characteristic of the architecture

The MVI architecture embraces reactive and functional programming. The two main components of this architecture, the View and the ViewModel can be seen as functions, taking an input and emiting outputs to each other. The View takes input from the ViewModel and emit back intents. The ViewModel takes input from the View and emit back view states. This means the View has only one entry point to forward data to the ViewModel and vice-versa, the ViewModel only has one way to pass information to the View.
This is reflected in their API. For instance, The View has only two exposed methods: