Skip to content

Commit

Permalink
Rename State which can conflict with SwiftUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed Feb 6, 2020
1 parent 81bf80b commit 0b63e02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/SwiftUIFlux/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import Foundation
import SwiftUI
import Combine

final public class Store<State: FluxState>: ObservableObject {
@Published public var state: State
final public class Store<StoreState: FluxState>: ObservableObject {
@Published public var state: StoreState

private var dispatchFunction: DispatchFunction!
private let reducer: Reducer<State>
private let reducer: Reducer<StoreState>

public init(reducer: @escaping Reducer<State>,
middleware: [Middleware<State>] = [],
state: State) {
public init(reducer: @escaping Reducer<StoreState>,
middleware: [Middleware<StoreState>] = [],
state: StoreState) {
self.reducer = reducer
self.state = state

Expand Down

0 comments on commit 0b63e02

Please sign in to comment.