This is an example project showing off a state machine with a simple UI to show off its capabilities. This is the initial branch, make sure to check out all the other branches as well!
This is the list of articles:
- Model View State Machine: MVS
- MVS series: Building the State Machine
- MVS series: Implementing side effects (Coming soon) <-- you are here
- MVS series: Creating nested states (Coming soon)
- MVS series: State Machine usage and reusable patterns (Coming soon)
The demo shows that you can control the following flow:
- Load form data, first time with an error we have to handle
- Manipulate data
- Save the data with input validation (not empty)
- Show the success screen
Compared to the previous solution, we now rely on side effects to trigger loading/saving, fire events and transition to a new state
This is a Kotlin Multiplatform project targeting Android, Web, Desktop (JVM).
- /composeApp is for code that will be shared across your Compose Multiplatform applications.
It contains several subfolders:
- commonMain is for code that’s common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to edit the Desktop (JVM) specific part, the jvmMain folder is the appropriate location.
Learn more about Kotlin Multiplatform, Compose Multiplatform, Kotlin/Wasm…
You can open the desktop app with hot reload by hitting the "play" button in the gutter inside desktop's Main.kt file.
You can also open the web application by running the :composeApp:wasmJsBrowserDevelopmentRun Gradle task.