Flywheel

A simple and predictable state management library inspired by Flux + Elm + Redux. Flywheel is built on top of Corotuines using the concepts of structured concurrency. At the core, lies the which is based on .
Why Flywheel?
The goal was to make the state management concept of Redux simple, understandable & easy to use in Kotlin based projects. To achieve that, we adapted only the core concepts from Redux and slightly modified them. We excluded Android, Apple or any platform-specific dependencies. It is just pure Kotlin. By doing so, you are free to choose your architecture that best suits your codebase, no need to make any big refactor to fit in Flywheel. Don't be fooled by its simplicity, Flywheel got you covered for all practical use-cases. Even if we missed anything, it can be easily extended to support your use cases.
Getting started
In Kotlin Multiplatfrom project:
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.msabhi:flywheel:1.1.6")
}
}
}
}
In Android / Gradle project:
dependencies {
implementation("com.msabhi:flywheel-android:1.1.6")
}
In Apple platforms (Swift Package Manager)

In Xcode, go to File → Add Package Dependencies and enter the repository URL:
https:
Or add it to your Package.swift:
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/abhimuktheeswarar/Flywheel.git", from: "1.1.6"),
]
)
Each GitHub release includes a Flywheel.xcframework.zip artifact with a matching Package.swift manifest containing the URL and checksum.
Building the XCFramework locally
The XCFramework is not checked into the repository. To build it from source:
./gradlew :flywheel:copyXCFrameworkToRepo
./gradlew :flywheel:generatePackageSwift
./gradlew prepareSpmRelease
Usage
This is how a simple counter example looks like.
To learn more about Flywheel, head on over to our wiki.
License
Copyright (C) 2021 Abhi Muktheeswarar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.