Add ViewStore._Snapshot
#1347
tgrapperon
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While developing high-performance utilities as a third party, I often find myself limited by the need to create whole
ViewStore
to simply access the state of aStore
at some point.I'm understanding why the state of
Store
is internal, but I feel that this approach would put it far enough to avoid misuses.As an aside, this would probably allow to extract
SwiftUI
andUIKit
utilities into their own modules/libraries, which would likely help on the backward compatibility front (at the cost of an higher complexity for maintainers I admit). It would also make sense in the future, if TCA happens to not rely onCombine
anymore.This is only a proposal to get an efficient access to the
Store
's state as a third party. I'm open to any alternative, as long as I don't create a completeViewStore
.What do you think about it?
Beta Was this translation helpful? Give feedback.
All reactions