GithubHelp home page GithubHelp logo

cypherpoet / swiftuireduxutils Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 2.27 MB

A collection utilities for architecting SwiftUI apps in the Redux/Elm style of Reducers, Actions, Side Effects and Middlewares. Now updated for Swift Concurrency.

License: MIT License

Swift 89.31% Shell 10.69%
swift swift-package-manager swift-packages swift-libraries swiftui swiftui-libraries swiftui-redux redux swift-combine-redux swift-data-flow

swiftuireduxutils's Introduction

SwiftUI Redux Utils

Twitter: @cypher_poet

A collection utilities for architecting SwiftUI apps in the Redux/Elm style of Reducers, Actions, Side Effects and Middlewares.

Installation

Xcode Projects

Select File -> Swift Packages -> Add Package Dependency and enter https://github.com/CypherPoet/SwiftUIReduxUtils.

Swift Package Manager Projects

You can add CypherPoetSwiftUIReduxUtils as a package dependency in your Package.swift file:

let package = Package(
    //...
    dependencies: [
        .package(
            name: "CypherPoetSwiftUIReduxUtils",
            url: "https://github.com/CypherPoet/SwiftUIReduxUtils",
            .upToNextMinor(from: "0.5.0")
        ),
    ],
    //...
)

From there, refer to the SwiftUIReduxUtils "product" delivered by the CypherPoetSwiftUIReduxUtils "package" inside of any of your project's target dependencies:

targets: [
    .target(
        name: "YourLibrary",
        dependencies: [
            .product(
                name: "SwiftUIReduxUtils",
                package: "CypherPoetSwiftUIReduxUtils"
            ),
        ],
        ...
    ),
    ...
]

Then simply import SwiftUIReduxUtils wherever youโ€™d like to use it.

Usage

The goal of these utilities is to serve as primitives for architecting SwiftUI apps in the Redux/Elm style of Reducers, Actions, Side Effects and Middlewares.

Version 0.2.2 had an example application that demonstrated this, but it's no longer functional after 0.3.0's concurrency refactor. That said, until I get a new example in place, it could still be useful to look through to some extent.

Contributing

There aren't many to-dos here at the moment, but feedback and suggestions are certainly not discouraged. Check out some of the issue templates for more info.

Developing

Requirements

  • Xcode 13.0+

๐Ÿ“œ Creating & Building Documentation

Documentation is built with Xcode's DocC. See Apple's guidance on how to build, run, and create DocC content.

For now, the best way to view the docs is to open the project in Xcode and run the Build Documentation command. At some point in the future, I'm hoping to leverage the tooling the develops for generating/hosting DocC documentation. (Please feel free to let me know if you have any ideas or tooling recommendations around this ๐Ÿ™‚).

Acknowledgments

This project wouldn't be possible without several enlightening projects, articles, and tutorials by others in the Swift community who latched onto using these patterns in SwiftUI. Here are just a few of its main inspirations:

License

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

swiftuireduxutils's People

Contributors

cypherpoet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.