Skip to content

Commit

Permalink
Refactoring (#6)
Browse files Browse the repository at this point in the history
* create single state stream, added examle app, added transform functions, support for sync mutations (for SwiftUI Binding and Animations), added BaseReactor, added some tests

* split up in files, added Mutations initializer

* added comments to new types

* add more comments

* added more comments

* updated the README

* added .swiftpm to gitignore, added missing example app project file

* update comment to call createStateStream method at some point

* fixed transform functions not getting called when inheriting from BaseReactor

* fixed issue with sync mutation results getting overwritten by async mutations

* small changes to the InternalState struct, added transform to the README

* removed (possibly) unecessary thread lock

* Changed ActionBinding to support nested reactors, removed MutationBinding, added EnvironmentReactor property wrapper

* added missing public modifiers, fixed example app build

* fix build for older Swift version < 5.3

* edited README: added reactor protocol description, restructured advanced section

* fixed missing comment slash and added a reference to the example project

* update readme for new bindings and nested reactor

* Add UIKit Helper and Instructions (#8)

* added uikit

* added tests

* updated README UIKit instructions, added BaseReactorViewController, added more UIKit tests

* small changes

Co-authored-by: Julian Pomper <[email protected]>

* updated the README with more examples, updated the uikit library for tests

* rename to SwiftyReactor (#9)

* rename to SwiftyReactor

* updated urls for master branch

* fixed spacings

* fixed typo in README

* Renaming#2 (#10)

* renamed to SwiftReactor

* fixed example

Co-authored-by: oanhof<[email protected]>
Co-authored-by: Julian Pomper <[email protected]>
  • Loading branch information
Julian Pomper and Julian Pomper authored Aug 14, 2020
1 parent 4676fb4 commit 918f068
Show file tree
Hide file tree
Showing 30 changed files with 2,053 additions and 278 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ fastlane/test_output
iOSInjectionProject/

### SwiftPackageManager ###
.swiftpm
Packages
xcuserdata
*.xcodeproj


### SwiftPM ###
Expand Down
25 changes: 18 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PackageDescription

let package = Package(
name: "SwiftUIReactor",
name: "SwiftReactor",
platforms: [
.iOS(.v13),
.tvOS(.v13),
Expand All @@ -14,8 +14,11 @@ let package = Package(
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SwiftUIReactor",
targets: ["SwiftUIReactor"]),
name: "SwiftReactor",
targets: ["SwiftReactor"]),
.library(
name: "SwiftReactorUIKit",
targets: ["SwiftReactorUIKit"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
Expand All @@ -25,10 +28,18 @@ let package = Package(
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftUIReactor",
dependencies: []),
name: "SwiftReactor",
dependencies: [],
path: "Sources/SwiftReactor"),
.target(
name: "SwiftReactorUIKit",
dependencies: ["SwiftReactor"],
path: "Sources/SwiftReactorUIKit"),
.testTarget(
name: "SwiftReactorTests",
dependencies: ["SwiftReactor"]),
.testTarget(
name: "SwiftUIReactorTests",
dependencies: ["SwiftUIReactor"]),
name: "SwiftReactorUIKitTests",
dependencies: ["SwiftReactorUIKit"])
]
)
Loading

0 comments on commit 918f068

Please sign in to comment.