Jungle is a Kotlin MVI library, that uses RxJava and its reactive approach.
Advantages of this lib:
- Easy to understand and use
- Can improve project structure
- Goes well with Clean Architecture
- Hannes Dorfmann's Reactive Apps with Model-View-Intent series of articles
- Jake Wharton's Managing State with RxJava
Gradle:
implementation 'com.github.c5fr7q:jungle:1.2.1'
Maven:
<dependency>
<groupId>com.github.c5fr7q</groupId>
<artifactId>jungle</artifactId>
<version>1.2.1</version>
<type>pom</type>
</dependency>
- State - an entity, that contains data about persistent part of UI.
- Action - an entity, that contains data about unstable part of UI.
- Event - an Intent of user.
- Store - this is where the magic is. Analogue of Presenter from MVP. Middleman between Model and View.
- Middleware - a middleman between one functionality of business logic and UI.
- MviView - a View from MVI. An interface, that contains two methods for dealing with actions and states.