Skip to content

Commit

Permalink
Updates MiddlewareType to observe Store instead of the Current State
Browse files Browse the repository at this point in the history
  • Loading branch information
nazeehshoura committed Jun 6, 2017
1 parent 23f8e42 commit c30c97e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RxState/RxState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public class Store: StoreType {
self.middlewares.append(contentsOf: middlewares)

for middleware in middlewares {
middleware.observe(currentStateLastAction: self.currentStateLastAction)
middleware.observe(store: self)
}
}
}
Expand Down Expand Up @@ -149,7 +149,7 @@ public protocol ActionType {}
That's how you get predictable state change.
*/
public protocol MiddlewareType {
func observe(currentStateLastAction: Driver<CurrentStateLastAction>)
func observe(store: StoreType)
}

/**
Expand Down

0 comments on commit c30c97e

Please sign in to comment.