-
swift-composable-architecture
A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "DogBreedsComponent", platforms: [.iOS(.v14)], products: [ .library( name: "DogBreedsComponent", targets: ["DogBreedsComponent"] ), ], dependencies: [ // 1. .package( name: "swift-composable-architecture", url: "https://github.com/pointfreeco/swift-composable-architecture.git", .exact("0.17.0") ), // 2. .package( name: "Kingfisher", url: "https://github.com/onevcat/Kingfisher", .exact("6.2.1") ) ], targets: [ .target( name: "DogBreedsComponent", dependencies: [ .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), .product(name: "Kingfisher", package: "Kingfisher") ] ), .testTarget( name: "DogBreedsComponentTests", dependencies: [ "DogBreedsComponent", .product(name: "ComposableArchitecture", package: "swift-composable-architecture") ] ), ] )
You can find the source code of this tutorial here. If you're so eager to try it that you want to skip the tutorial, just launch RootView.swift preview.
// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "DogBreedsComponent", platforms: [.iOS(.v14)], products: [ .library( name: "DogBreedsComponent", targets: ["DogBreedsComponent"] ), ], dependencies: [ // 1. .package( name: "swift-composable-architecture", url: "https://github.com/pointfreeco/swift-composable-architecture.git", .exact("0.17.0") ), // 2. .package( name: "Kingfisher", url: "https://github.com/onevcat/Kingfisher", .exact("6.2.1") ) ], targets: [ .target( name: "DogBreedsComponent", dependencies: [ .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), .product(name: "Kingfisher", package: "Kingfisher") ] ), .testTarget( name: "DogBreedsComponentTests", dependencies: [ "DogBreedsComponent", .product(name: "ComposableArchitecture", package: "swift-composable-architecture") ] ), ] )
Via the usage of pointfree CasePath (if you'd like to know more, check out this repository. In short, it's a way to use enums in the same fashion as KeyPaths). We can say that DogsReducer is only going to work with the AppAction.dogs part of AppAction.
redux.js.org Thorough documentation about Redux framework for js. Don't need to go into the details, but this website contains a good explanation of the concept.