Skip to content

Commit

Permalink
Record state access when constructing _StoreCollection. (#3521)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw authored Jan 7, 2025
1 parent 8d727d6 commit cc17134
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public struct _StoreCollection<ID: Hashable & Sendable, State, Action>: RandomAc
#endif
fileprivate init(_ store: Store<IdentifiedArray<ID, State>, IdentifiedAction<ID, Action>>) {
self.store = store
store._$observationRegistrar.access(store, keyPath: \.currentState)
self.data = store.withState { $0 }
}

Expand Down

0 comments on commit cc17134

Please sign in to comment.