-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEffects.swift
More file actions
44 lines (34 loc) · 910 Bytes
/
Copy pathEffects.swift
File metadata and controls
44 lines (34 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Effects.swift
// ReSwiftLoop
//
// Created by William Key on 6/1/16.
// Copyright © 2016 William Key. All rights reserved.
//
import Foundation
import ReSwift
public struct AsyncActionCreatorEffect<state: StateType>: Effect {
let factory: () -> Store<state>.AsyncActionCreator
init(_ factory: () -> Store<state>.AsyncActionCreator) {
self.factory = factory
}
}
public struct ActionCreatorEffect<state: StateType>: Effect {
let factory: () -> Store<state>.ActionCreator
init(_ factory: () -> Store<state>.ActionCreator) {
self.factory = factory
}
}
public struct BatchEffect: Effect {
let effects: [Effect]
init(_ effects: [Effect]) {
self.effects = effects
}
}
public struct ActionEffect: Effect {
let action: Action
init(_ action: Action) {
self.action = action
}
}
public protocol Effect { }