# airbnb/mavericks

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/airbnb-mavericks).**

5,934 stars · 510 forks · Kotlin · Apache-2.0

## Links

- GitHub: https://github.com/airbnb/mavericks
- Homepage: https://airbnb.io/mavericks/
- awesome-repositories: https://awesome-repositories.com/repository/airbnb-mavericks.md

## Description

Mavericks is an opinionated Android state management framework that structures screen-level state as a single immutable object and processes user actions through a unidirectional data flow. It enforces state immutability to prevent unintended mutations and simplify debugging, while managing state subscriptions and cleanup based on Android lifecycle events to prevent memory leaks.

The framework uses a ViewModel-driven architecture where business logic and state management are encapsulated in ViewModels that survive configuration changes. User actions are handled through dedicated intent objects that update state in a controlled, predictable manner, and state changes are exposed reactively via LiveData or RxJava observables to ensure the UI layer always reflects the latest data.

Mavericks enables building reactive Android screens of any complexity without increasing debugging difficulty, as the entire UI state is defined as a single immutable object that automatically updates the UI through reactive subscriptions. The framework's documentation covers installation and setup for integrating this state management approach into Android applications.

## Tags

### Mobile Development

- [Android State Management Frameworks](https://awesome-repositories.com/f/mobile-development/android-state-management-frameworks.md) — Managing complex UI state in Android apps with a single immutable state object and reactive updates.

### Software Engineering & Architecture

- [Android](https://awesome-repositories.com/f/software-engineering-architecture/state-management-frameworks/android.md) — An opinionated framework for managing reactive screen state and user actions in Android applications using immutable state objects and unidirectional data flow.
- [UI Data Observers](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/reactive-subscription-systems/observer-patterns/ui-data-observers.md) — Exposes state changes via LiveData or RxJava observables, ensuring the UI layer always reflects the latest data.
- [User Action Intents](https://awesome-repositories.com/f/software-engineering-architecture/intent-based-coordination/intent-to-action-handlers/user-action-intents.md) — Processes user actions through dedicated intent objects that update state in a controlled, predictable manner.
- [Lifecycle-Aware State Management](https://awesome-repositories.com/f/software-engineering-architecture/memory-usage-analysis/memory-leak-prevention/lifecycle-aware-state-management.md) — Automatically manages state subscriptions and cleanup based on Android lifecycle events to prevent memory leaks.
- [Unidirectional Data Flow Architectures](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/action-reducer-architectures/unidirectional-data-flow-architectures.md) — Implementing a predictable data flow pattern where user actions update state through a dedicated handler.
- [Screen-Level State Stores](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/centralized-state-stores/screen-level-state-stores.md) — Manages screen state as a single immutable object with reactive subscriptions for automatic UI updates.
- [Immutable State Patterns](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/immutable-data-strategies/immutable-state-patterns.md) — Enforces state immutability to prevent unintended mutations and simplify debugging of complex screen compositions.
- [Lifecycle-Aware ViewModels](https://awesome-repositories.com/f/software-engineering-architecture/view-model-architectures/model-view-viewmodel/lifecycle-aware-viewmodels.md) — Encapsulates business logic and state management in ViewModels that survive configuration changes and lifecycle events.

### Data & Databases

- [Immutable Screen State Stores](https://awesome-repositories.com/f/data-databases/persistent-application-state/screen-state-managers/immutable-screen-state-stores.md) — Structuring screen-level state as a single immutable object for clarity and testability.

### User Interface & Experience

- [Reactive UI Frameworks](https://awesome-repositories.com/f/user-interface-experience/reactive-ui-frameworks.md) — Building reactive Android screens that automatically reflect state changes without manual synchronization.
- [Intent-Based Action Handlers](https://awesome-repositories.com/f/user-interface-experience/user-interaction-handling/intent-based-action-handlers.md) — Process user intents in a dedicated object that updates state, keeping business logic separate from the UI layer. ([source](https://airbnb.io/mavericks))

### Web Development

- [Immutable Screen State Managers](https://awesome-repositories.com/f/web-development/reactive-state-management/immutable-screen-state-managers.md) — Define the entire UI state as a single immutable object and expose it reactively so the screen always reflects the latest data. ([source](https://airbnb.io/mavericks))
- [Complex State Management](https://awesome-repositories.com/f/web-development/complex-state-management.md) — Compose screens of any complexity without increasing debugging difficulty or code complexity. ([source](https://airbnb.io/mavericks))
