Merge branch ‘develop’
Conflicts:
flywheel/xcframework/Flywheel.xcframework/Info.plist
flywheel/xcframework/Flywheel.xcframework/ios-arm64/flywheel.framework/flywheel
flywheel/xcframework/Flywheel.xcframework/ios-x86_64-simulator/flywheel.framework/flywheel
flywheel/xcframework/Flywheel.xcframework/macos-x86_64/flywheel.framework/Versions/A/flywheel
flywheel/xcframework/Flywheel.xcframework/tvos-arm64/flywheel.framework/flywheel
flywheel/xcframework/Flywheel.xcframework/tvos-x86_64-simulator/flywheel.framework/flywheel
flywheel/xcframework/Flywheel.xcframework/watchos-arm64_32/flywheel.framework/flywheel
flywheel/xcframework/Flywheel.xcframework/watchos-x86_64-simulator/flywheel.framework/flywheel
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 State Machine which is based on actor model.
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:
In Android / Gradle project:
In Apple platforms
You can use the Swift Package Manager to install
Flywheel
by adding the proper description to yourPackage.swift
file:Then run
swift build
whenever you get prepared.Usage
This is how a simple counter example looks like.
Define a state.
Define actions that can change the state.
Define a reducer that updates the state based on the action & current state.
Create a StateReserve.
Listen for state changes
Send actions to StateReserve to update the state.
To learn more about Flywheel, head on over to our wiki.
License