Skip to content

Commit

Permalink
🌲 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
muukii committed Oct 24, 2023
1 parent da59296 commit 0711580
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Sources/Verge/Store/IsolatedStore.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@

@MainActor
public final class MainActorStore<State: StateType, Activity>: DerivedMaking, Sendable, MainActorStoreDriverType {
public final class MainActorStore<State: StateType, Activity>: DerivedMaking, Sendable, MainActorStoreDriverType, ObservableObject {

public typealias State = State

public nonisolated var objectWillChange: ObservableObjectPublisher {
backingStore.objectWillChange
}

public nonisolated var store: MainActorStore<State, Activity> { self }

public typealias Scope = State
Expand Down Expand Up @@ -117,10 +121,14 @@ public final class MainActorStore<State: StateType, Activity>: DerivedMaking, Se
}
}

public final class AsyncStore<State: StateType, Activity>: DerivedMaking, Sendable, AsyncStoreDriverType {
public final class AsyncStore<State: StateType, Activity>: DerivedMaking, Sendable, AsyncStoreDriverType, ObservableObject {

public typealias State = State

public var objectWillChange: ObservableObjectPublisher {
backingStore.objectWillChange
}

public var store: AsyncStore<State, Activity> { self }

public typealias Scope = State
Expand Down

0 comments on commit 0711580

Please sign in to comment.