Skip to content
MVU for Kotlin Multiplatform
Branch: master
Clone or download
Michael Pardo
Michael Pardo Add Analytics script.
Latest commit 5b5c721 Jun 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildscript Change pardo references to oolong-kt. (#23) Mar 20, 2019
.github/ISSUE_TEMPLATE Update issue templates (#21) Mar 20, 2019
buildSrc Require non-null type parameters. May 19, 2019
docs Add Analytics script. Jun 14, 2019
gradle Use Docsify. May 20, 2019
oolong fix(runtime): Remove default arguments for Runtime constructor. Jun 9, 2019
samples docs(samples): Fix insecure js imports. Jun 7, 2019
.gitignore docs(samples): Add samples to docs. Jun 7, 2019
.travis.yml Api cleanup (#50) Apr 26, 2019 Create Aug 1, 2018 Update May 31, 2019
build.gradle.kts Clean deletes dokka dir and build depends on dokka. May 21, 2019
gradlew Fix refactorings. Feb 3, 2019
gradlew.bat Fix refactorings. Feb 3, 2019
settings.gradle.kts Extract MainLoopDispatcher to sample utils. May 19, 2019


Build Status Maven Central Sonatype Nexus (Snapshots) License Gitter chat

Oolong is an Elm inspired Model-View-Update (MVU) implementation for Kotiln multiplatform. As the name implies, three core concepts comprise the foundation of this architecture:

  • Model - a type to represent the program state

  • View - a function to map the state to view properties

  • Update - a function to update the state

By applying this simple pattern you can create composable, testable programs that can run on any platform. Oolong enables a common codebase for all platforms by using a Render function which is implemented by each frontend.

Get started with Oolong by reading the official guide.


The following is a simple counter example in which the count can be incremented or decremented.

object Counter {

    data class Model(
        val count: Int = 0

    sealed class Msg {
        object Increment : Msg()
        object Decrement : Msg()

    class Props(
        val count: Int,
        val increment: () -> Msg,
        val decrement: () -> Msg

    val init: Init<Model, Msg> = { 
        Model() to none()

    val update: Update<Model, Msg> = { msg, model ->
        when (msg) {
            Msg.Increment -> model.copy(count = model.count + 1)
            Msg.Decrement -> model.copy(count = model.count - 1)
        } to none()

    val view: View<Model, Props> = { model ->
            { Msg.Increment },
            { Msg.Decrement }



More examples can be found in the samples directory.


Further reading can be found in the official guide and documentation.


dependencies {
You can’t perform that action at this time.