{"id":13473487,"url":"https://github.com/orbit-mvi/orbit-mvi","last_synced_at":"2026-04-01T19:49:56.876Z","repository":{"id":38020321,"uuid":"323600732","full_name":"orbit-mvi/orbit-mvi","owner":"orbit-mvi","description":"A simple MVI framework for Kotlin Multiplatform and Android","archived":false,"fork":false,"pushed_at":"2026-03-30T18:46:44.000Z","size":3876,"stargazers_count":1295,"open_issues_count":34,"forks_count":78,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-03-30T20:32:45.608Z","etag":null,"topics":["hacktoberfest","mvi","mvi-android","mvi-coroutines-flow","mvi-coroutines-flow-kotlin"],"latest_commit_sha":null,"homepage":"https://orbit-mvi.org","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbit-mvi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["mattmook"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-12-22T11:01:18.000Z","updated_at":"2026-03-30T18:46:48.000Z","dependencies_parsed_at":"2024-01-16T07:23:08.864Z","dependency_job_id":"50ced080-083f-46e3-9554-379151e2e846","html_url":"https://github.com/orbit-mvi/orbit-mvi","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/orbit-mvi/orbit-mvi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit-mvi%2Forbit-mvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit-mvi%2Forbit-mvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit-mvi%2Forbit-mvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit-mvi%2Forbit-mvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbit-mvi","download_url":"https://codeload.github.com/orbit-mvi/orbit-mvi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbit-mvi%2Forbit-mvi/sbom","scorecard":{"id":711660,"data":{"date":"2025-08-11","repo":{"name":"github.com/orbit-mvi/orbit-mvi","commit":"0c550c1a95be5198856235ff1f598888cb5abae0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":8,"reason":"Found 17/19 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-and-release.yml:1","Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:124: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:130: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:138: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:149: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/build-and-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/orbit-mvi/orbit-mvi/docs.yml/main?enable=pin","Warn: containerImage not pinned by hash: website/Dockerfile:1: pin your Docker image by updating node:18-alpine to node:18-alpine@sha256:8d6421d663b4c28fd3ebc498332f249011d118945588d0a35cb9bc4b8ca09d9e","Info:   0 out of  21 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build-and-release.yml:134"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:20:40.963Z","repository_id":38020321,"created_at":"2025-08-22T08:20:40.963Z","updated_at":"2025-08-22T08:20:40.963Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","mvi","mvi-android","mvi-coroutines-flow","mvi-coroutines-flow-kotlin"],"created_at":"2024-07-31T16:01:04.146Z","updated_at":"2026-04-01T19:49:56.871Z","avatar_url":"https://github.com/orbit-mvi.png","language":"Kotlin","funding_links":["https://github.com/sponsors/mattmook"],"categories":["Kotlin","Libraries","Library"],"sub_categories":["Architecture","🏗 Architecture"],"readme":"# Orbit Multiplatform\n\n[![CI status](https://github.com/orbit-mvi/orbit-mvi/actions/workflows/build-and-release.yml/badge.svg)](https://github.com/orbit-mvi/orbit-mvi/actions)\n[![codecov](https://codecov.io/gh/orbit-mvi/orbit-mvi/branch/main/graph/badge.svg)](https://codecov.io/gh/orbit-mvi/orbit-mvi)\n[![Download](https://img.shields.io/maven-central/v/org.orbit-mvi/orbit-core)](https://search.maven.org/artifact/org.orbit-mvi/orbit-core)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.md)\n\n![Logo](images/logo.png)\n\n## Get in touch\n\n[![slack logo](images/slack-logo-icon.png)](https://kotlinlang.slack.com/messages/CPM6UMD2P)\n[![twitter logo](images/twitter-small.png)](https://twitter.com/orbit_mvi)\n\n## What is Orbit\n\nOrbit is a simple, type-safe MVI framework for Kotlin Multiplatform, enabling\nshared business logic across Android, iOS and desktop. With a Redux/MVI-inspired\nunidirectional data flow, it streamlines state management within MVVM—think of\nit as MVVM+.\n\nKey features:\n\n- **Multiplatform Support:** Share code seamlessly across Android, iOS and\n  desktop.\n- **Lifecycle-Safe Flows:** Collect infinite flows safely, preventing memory\n  leaks.\n- **Multiplatform ViewModel \u0026 SavedState:** Manage UI state efficiently across\n  platforms including being able to save state.\n- **Compose Multiplatform:** Build declarative UIs with shared code.\n- **Testing and Tooling:** Includes unit tests and Espresso idling resource\n  support.\n\n## Documentation\n\n- [Getting Started](https://orbit-mvi.org)\n- [Core](https://orbit-mvi.org/Core/)\n- [Android and Common ViewModel](https://orbit-mvi.org/ViewModel/)\n- [Jetpack Compose and Compose Multiplatform](https://orbit-mvi.org/Compose/)\n- [Test](https://orbit-mvi.org/Test/)\n- [Dokka source code documentation](https://orbit-mvi.org/dokka/)\n- [Resources](https://orbit-mvi.org/resources)\n\n### Articles \u0026 Talks\n\n- [How to write your own MVI library and why you shouldn't](https://www.youtube.com/watch?v=E6obYmkkdko)\n- [Top Android MVI libraries in 2021](https://appmattus.medium.com/de1afe890f27)\n- [Orbit Multiplatform wins Kotlin Foundation Grant: A Journey and a Look Ahead](https://appmattus.medium.com/6b949cf8133e)\n\n## Getting started\n\n[![Download](https://img.shields.io/maven-central/v/org.orbit-mvi/orbit-viewmodel)](https://search.maven.org/artifact/org.orbit-mvi/orbit-viewmodel)\n\n```kotlin\n// Core of Orbit, providing state management and unidirectional data flow (multiplatform)\nimplementation(\"org.orbit-mvi:orbit-core:\u003clatest-version\u003e\")\n\n// Integrates Orbit with Android and Common ViewModel for lifecycle-aware state handling (Android, iOS, desktop)\nimplementation(\"org.orbit-mvi:orbit-viewmodel:\u003clatest-version\u003e\")\n\n// Enables Orbit support for Jetpack Compose and Compose Multiplatform (Android, iOS, desktop)\nimplementation(\"org.orbit-mvi:orbit-compose:\u003clatest-version\u003e\")\n\n// Simplifies testing with utilities for verifying state and event flows (multiplatform)\ntestImplementation(\"org.orbit-mvi:orbit-test:\u003clatest-version\u003e\")\n```\n\n### Define the contract\n\n```kotlin\ndata class CalculatorState(\n    val total: Int = 0\n)\n\nsealed class CalculatorSideEffect {\n    data class Toast(val text: String) : CalculatorSideEffect()\n}\n```\n\n### Create the ViewModel\n\n1. Implement the\n   [OrbitContainerHost](orbit-core/src/commonMain/kotlin/org/orbitmvi/orbit/ContainerHost.kt)\n   interface\n1. Override the `container` field and use the `ViewModel.orbitContainer` factory\n   function to build an Orbit\n   [OrbitContainer](orbit-core/src/commonMain/kotlin/org/orbitmvi/orbit/Container.kt)\n   in your\n   [OrbitContainerHost](orbit-core/src/commonMain/kotlin/org/orbitmvi/orbit/ContainerHost.kt)\n\n```kotlin\nclass CalculatorViewModel: OrbitContainerHost\u003cCalculatorState, CalculatorState, CalculatorSideEffect\u003e, ViewModel() {\n\n    // Include `orbit-viewmodel` for the factory function\n    override val container = orbitContainer\u003cCalculatorState, CalculatorSideEffect\u003e(CalculatorState())\n\n    fun add(number: Int) = intent {\n        postSideEffect(CalculatorSideEffect.Toast(\"Adding $number to ${state.total}!\"))\n\n        reduce {\n            state.copy(total = state.total + number)\n        }\n    }\n}\n```\n\nWe have used an Android `ViewModel` as the most common example, but there is no\nrequirement to do so.\n\n### Connect to the ViewModel in your Activity or Fragment\n\n```kotlin\nclass CalculatorActivity: AppCompatActivity() {\n\n    // Example of injection using koin, your DI system might differ\n    private val viewModel by viewModel\u003cCalculatorViewModel\u003e()\n\n    override fun onCreate(savedState: Bundle?) {\n        ...\n\n        addButton.setOnClickListener { viewModel.add(1234) }\n\n        viewModel.observe(state = ::render, sideEffect = ::handleSideEffect)\n    }\n\n    private fun render(state: CalculatorState) {\n        ...\n    }\n\n    private fun handleSideEffect(sideEffect: CalculatorSideEffect) {\n        when (sideEffect) {\n            is CalculatorSideEffect.Toast -\u003e toast(sideEffect.text)\n        }\n    }\n}\n```\n\nWith Jetpack Compose wire up the ViewModel as follows:\n\n```kotlin\n@Composable\nfun CalculatorScreen(viewModel: CalculatorViewModel) {\n\n    val state = viewModel.collectAsState().value\n\n    viewModel.collectSideEffect { handleSideEffect(it) }\n\n    // render UI using data from 'state'\n    ...\n}\n\nprivate fun handleSideEffect(sideEffect: CalculatorSideEffect) {\n    when (sideEffect) {\n        is CalculatorSideEffect.Toast -\u003e toast(sideEffect.text)\n    }\n}\n```\n\n## Contributing\n\nPlease read [contributing](CONTRIBUTING.md)\nfor details on our code of conduct, and the process for submitting pull\nrequests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions\navailable, see the\n[tags on this repository](https://github.com/orbit-mvi/orbit-mvi/tags).\n\n## License\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.md)\n\nThis project is licensed under the Apache License, Version 2.0 - see the\n[license](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbit-mvi%2Forbit-mvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbit-mvi%2Forbit-mvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbit-mvi%2Forbit-mvi/lists"}