Swiftelm

Reactive + Automaton + VTree in Swift, inspired by Elm.
Alternatives To Swiftelm
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Reactive Resume11,662
4 days ago221mitTypeScript
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Formily9,6371194 days ago209September 20, 202214mitTypeScript
📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3
Watermelondb9,11213920 days ago149August 30, 2022152mitJavaScript
🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
Mobx State Tree6,6514792593 months ago107August 09, 2022201mitTypeScript
Full-featured reactive state management without the boilerplate
Realm Js5,2636361045 hours ago341September 15, 2022569apache-2.0TypeScript
Realm is a mobile database: an alternative to SQLite & key-value stores
Effector4,21526109a day ago242April 15, 2022140mitTypeScript
Business logic with ease ☄️
Awesome Mobx2,149
2 months ago12
A collection of awesome things regarding MobX.
Tinybase2,049
a day ago31July 12, 20228mitTypeScript
The reactive data store for local‑first apps.
Devextreme Reactive1,992130865 hours ago97August 22, 202291otherTypeScript
Business React components for Bootstrap and Material-UI
Rest Hooks1,795
5 hours ago11apache-2.0TypeScript
Normalized state management for async data. Safe. Fast. Reusable.
Alternatives To Swiftelm
Select To Compare


Alternative Project Comparisons
Readme

SwiftElm

Reactive + Automaton + VTree in Swift, inspired by Elm.

Note: This library is only a 100 lines of code.

Example

// main.swift

import UIKit
import VTree
import SwiftElm

enum Msg: AutoMessage {
    case increment
    case decrement
}

typealias Model = Int

func update(state: Model, input: Msg) -> Model? {
    switch input {
        case .increment:
            return state + 1
        case .decrement:
            return state - 1
    }
}

func view(_ model: Model) -> VView<Msg> {
    return VView(children: [
        *VLabel(text: "\(model)"),
        *VButton(title: "+", handlers: [.touchUpInside : .increment]),
        *VButton(title: "-", handlers: [.touchUpInside : .decrement]),
    ])
}

// App main entrypoint (using `UIApplicationMain`).
appMain {
    return Program(model: 0, update: update, view: view)
}

Please see Demo Projects for more information.

Metaprogramming with Sourcery

SwiftElm uses Sourcery as Swift template metaprogramming engine to cover transcripting that elm-lang/core does when converting enum MyMsg to JavaScript.

Please see VTree/README.md for more information.

Acknowledgement

  • Evan Czaplicki: Creator of Elm

License

MIT

Popular Reactive Projects
Popular Reactjs Projects
Popular Control Flow Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Reactjs
Swift
Reactive
Elm
State Machine
Virtual Dom
Metaprogramming