Mavericks

Mavericks: 自动驾驶的安卓系统。「MvRx: Android on Autopilot」

Github stars Tracking Chart

MvRx: Android on Autopilot

For full documentation, check out the wiki

MvRx (pronounced mavericks) is the Android framework from Airbnb that we use for nearly all product development at Airbnb.

When we began creating MvRx, our goal was not to create yet another architecture pattern for Airbnb, it was to make building products easier, faster, and more fun. All of our decisions have built on that. We believe that for MvRx to be successful, it must be effective for building everything from the simplest of screens to the most complex in our app.

This is what it looks like:


data class HelloWorldState(val title: String = "Hello World") : MvRxState

/**
 * Refer to the wiki for how to set up your base ViewModel.
 */
class HelloWorldViewModel(initialState: HelloWorldState) : MyBaseMvRxViewModel<HelloWorldState>(initialState, debugMode = BuildConfig.DEBUG) {
    fun getMoreExcited() = setState { copy(title = "$title!") }
}

class HelloWorldFragment : BaseFragment() {
    private val viewModel: HelloWorldViewModel by fragmentViewModel()

    override fun EpoxyController.buildModels() = withState(viewModel) { state ->
        header {
            title(state.title)
        }
        basicRow { 
            onClick { viewModel.getMoreExcited() }
        }
    }
}

Installation

Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:

dependencies {
  implementation 'com.airbnb.android:mvrx:x.y.z'
}

The latest version of mvrx is Maven Central

For full documentation, check out the wiki

Main metrics

Overview
Name With Ownerairbnb/mavericks
Primary LanguageKotlin
Program languageKotlin (Language Count: 3)
Platform
License:Apache License 2.0
所有者活动
Created At2018-07-03 06:11:45
Pushed At2025-10-17 00:58:10
Last Commit At
Release Count47
Last Release Namev3.0.12 (Posted on 2025-10-17 00:57:39)
First Release Namev0.0.5 (Posted on )
用户参与
Stargazers Count5.9k
Watchers Count99
Fork Count509
Commits Count390
Has Issues Enabled
Issues Count363
Issue Open Count56
Pull Requests Count308
Pull Requests Open Count6
Pull Requests Close Count49
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private