mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-31 06:23:18 +02:00
Xcode 11 beta 6
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import SwiftUI
|
||||
import Combine
|
||||
|
||||
final class Store<State, Action>: BindableObject {
|
||||
final class Store<State, Action>: ObservableObject {
|
||||
typealias Reducer = (State, Action) -> State
|
||||
|
||||
let willChange = PassthroughSubject<State, Never>()
|
||||
let objectWillChange = PassthroughSubject<State, Never>()
|
||||
|
||||
var state: State {
|
||||
lock.lock()
|
||||
@@ -29,6 +29,6 @@ final class Store<State, Action>: BindableObject {
|
||||
|
||||
lock.unlock()
|
||||
|
||||
willChange.send(newState)
|
||||
objectWillChange.send(newState)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user