Skip to content

Commit

Permalink
Fix store
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed Jul 29, 2019
1 parent 7e977b3 commit aa97f7f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/SwiftUIFlux/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import SwiftUI
import Combine

final public class Store<State: FluxState>: ObservableObject {

private(set) public var state: State
@Published public var state: State

private var dispatchFunction: DispatchFunction!
private let reducer: Reducer<State>
Expand Down Expand Up @@ -44,7 +43,6 @@ final public class Store<State: FluxState>: ObservableObject {
}

private func _dispatch(action: Action) {
objectWillChange.send()
state = reducer(state, action)
}
}

0 comments on commit aa97f7f

Please sign in to comment.