Skip to content

Commit f2f3b5e

Browse files
authoredJan 7, 2021
Updated more docs for 2.0 and added a navigation sample (airbnb#492)
I went through a bunch of the docs and: * Updated some for naming/API changes * Added navigation docs + a sample app * Updated the docs theme and sidebar organization * Rewrote some parts of the docs I found confusing
1 parent f73b9f1 commit f2f3b5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+664
-82
lines changed
 

‎docs/README.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
# Mavericks
55

6-
Mavericks is an Android MVI framework that is both easy to learn yet powerful enough for the most complex flows at Airbnb and other large apps.
6+
Mavericks is an Android MVI framework that is both easy to learn yet powerful enough for the most complex flows at [Airbnb](https://www.airbnb.com/), [Tonal](http://tonal.com/), and other large apps.
77

88
When we began creating Mavericks, our goal was to make building products easier, faster, and more fun. We believe that for Mavericks to be successful, it must be easy to learn for people new to Android development working their first apps yet powerful enough to support the most complex screens at Airbnb.
99

1010
Mavericks is used in hundreds of screens at Airbnb including 100% of new screens. It has also been adopted by countless other apps from small smaple apps to apps with over 1 billion downloads.
1111

12-
Mavericks is built on top of [Android Jetpack](https://developer.android.com/jetpack) so it can be thought of as a complement rather than a departure from Google's standard set of libraries.
12+
Mavericks is built on top of [Android Jetpack](https://developer.android.com/jetpack) and [Kotlin Coroutines](https://developer.android.com/kotlin/coroutines) so it can be thought of as a complement rather than a departure from Google's standard set of libraries.
1313

14-
This is what it looks like:
14+
This is what a simple screen looks like. More complex screens may have more state properties or ViewModel functions but they rarely get much more complex to debug or hard to read.
1515
```kotlin
1616
/** State classes contain all of the data you need to render a screen. */
1717
data class CounterState(val count: Int = 0) : MavericksState
@@ -21,7 +21,7 @@ class CounterViewModel(initialState: CounterState) : MavericksViewModel<CounterS
2121
fun incrementCount() = setState { copy(count = count + 1) }
2222
}
2323

24-
/** Fragments in MvRx are simple and rarely do more than bind your state to views. */
24+
/** Fragments in Mavericks are simple and rarely do more than bind your state to views. */
2525
class CounterFragment : Fragment(R.layout.counter_fragment), MavericksView {
2626
private val viewModel: CounterViewModel by activityViewModel()
2727

@@ -37,11 +37,8 @@ class CounterFragment : Fragment(R.layout.counter_fragment), MavericksView {
3737
}
3838
```
3939

40-
## Installation
40+
## Introduction to Mavericks (Droidcon Italy 2019)
4141

42-
```groovy
43-
dependencies {
44-
implementation 'com.airbnb.android:mvrx:x.y.z'
45-
}
46-
```
47-
The latest version of mvrx is [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.airbnb.android/mvrx/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.airbnb.android/mvrx)
42+
This conference talk was designed for MvRx 1.0 but nearly all of the concepts still apply.
43+
44+
<iframe width="560" height="315" src="https://www.youtube.com/embed/Web4xPi2Ga4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

‎docs/_sidebar.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
* [**Home**](README.md)
22
* [**Core Concepts**](core-concepts.md)
3-
* [**Async&lt;T&gt;**](async.md)
43
* [**Setting Up Mavericks**](setup.md)
5-
* [**Creating a Counter App**](counter.md)
4+
* [**What's new in Mavericks 2.0**](new-2x.md)
5+
* [**Upgrading from MvRx 1.x**](new-2x.md#upgrading)
6+
---
7+
* [**Async/Network/Db Operations**](async.md)
68
* [**Debug Checks**](debug-checks.md)
7-
* [**Threading**](threading.md)
8-
* [**ViewModel and State factories**](factories.md)
9-
* [**Dagger**](factories.md#dagger)
9+
* [**Dependency Injection/Dagger**](di.md)
10+
* [**Creating a Counter App**](counter.md)
1011
* [**Fragment Arguments**](fragment-arguments.md)
11-
* [**Persist State**](persist-state.md)
1212
* [**Mavericks Mocking**](mocking.md)
1313
* [**Launching Mocks**](launcher.md)
14+
* [**Persist State**](persist-state.md)
15+
* [**Proguard**](proguard.md)
16+
* [**Threading**](threading.md)
17+
* [**Tips**](tips.md)
18+
* [**ViewModel and State factories**](factories.md)
19+
---
1420
* [**Mavericks + Coroutines**](coroutines.md)
1521
* [**Mavericks + RxJava2**](rxjava2.md)
22+
* [**Mavericks + Jetpack Navigation**](jetpack-navigation.md)
23+
* [**Mavericks + Jetpack Compose**](jetpack-compose.md)
1624
* [**Mavericks + View Binding**](view-binding.md)
1725
* [**Mavericks + Epoxy**](epoxy.md)
18-
* [**Proguard**](proguard.md)
19-
* [**Tips**](tips.md)
20-
---
21-
* [**What's new in Mavericks 2.0**](new-2x.md)
22-
* [**Upgrading from MvRx 1.x**](new-2x.md#upgrading)

0 commit comments

Comments
 (0)
Please sign in to comment.