Swiftpack.co -  CypherPoet/CypherPoetReduxUtils as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
CypherPoet/CypherPoetReduxUtils
A collection utilities for architecting SwiftUI apps in the Redux/Elm style of Reducers, Actions, Side Effects and Middlewares.
.package(url: "https://github.com/CypherPoet/CypherPoetReduxUtils.git", from: "0.2.2")

CypherPoetReduxUtils

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/CypherPoetReduxUtils.

Swift Package Manager Projects

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

let package = Package(
    //...
    dependencies: [
        .package(
            url: "https://github.com/CypherPoet/CypherPoetReduxUtils",
            .upToNextMinor(from: "0.2.0")
        ),
    ],
    //...
)

Then simply import CypherPoetReduxUtils 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.

🔑 Check out the main Example App to see how it composes different types of app State into an app Store, initializes a root store as a @StateObject and injects it into into views as an @EnvironmentObject, and then sends actions to the store as a response to events in the UI.

Core Concepts

  • 🔑 An app Store is a composition of State slices — each governed by a Reducer that knows how to listen for a set of dispatched Actions.

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 12.0+

Generating Documentation

Documentation is generated by Jazzy. Installation instructions can be found here, and as soon as you have it set up, docs can be generated simply by running jazzy from the command line.

📝 Note that this will only generate a docs folder for you to view locally. This folder is being ignored by git, as an action exists to automatically generate docs and serve them on the project's gh-pages branch.

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

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

GitHub

link
Stars: 1
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API