Home

Awesome

Highway - create more product value in less time

Highway is an Redux-like architecture pattern implementation with Swift.

<img src="Resources/jared-murray-NSuufgf-BME-unsplash.jpg" alt="Highway" width="400"/>

Table of contents

Features

createMiddleware({ dispatch, getState, action in
    switch action {
    case .randomize:
        Task.init {
            let rand = await generateRandomValue()
            dispatch(.receiveRandomValue(Int(rand)))
        }
    }
})

Tutorials (Step by step guide)

Examples

Integration

Swift UI

Tests

Light/Small Apps

Heavy Apps

https://user-images.githubusercontent.com/2772537/177874199-1ba154f8-7982-4016-8618-dc59f76a5d6f.mov

Requirements

Installation (Cocoapods / SPM)

Highway is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Highway'

Also you can integrate framework as SPM package

Schemes

Simple unidirectional data flow

<img src="Resources/arch_animation.gif" alt="General" width="600"/>
  1. UI generate Action
  2. Action goes to Store
  3. Store mutate State (if needed)
  4. new State goes to UI
  5. Action goes to Middleware
  6. Middleware generate new action (if needed)
  7. new Action from Middleware goes to Store
  8. Store mutate State (if needed)
  9. new State goes to UI

Single shared state

<img src="Resources/ChildStoreScheme.png" alt="Child" width="400"/>

Alternatives

Tools used in project

TODO

Author

Dmitrii Cooler, coolerov333@gmail.com

Credits and thanks

The following people gave feedback on the library at its early stages and helped make the library what it is today:

Special thanks to:

License

Highway is available under the MIT license. See the LICENSE file for more info.