Skip to content

Commit

Permalink
Observable Architecture (#2593)
Browse files Browse the repository at this point in the history
* bring back view store performance

* wip

* Allow chaining of store bindings

* wip

* Localize ignoring bindings to text field resignation/dismissal

* wip

* fix DiagnosticsError message (#2597)

* store collection

* wip

* wip

* update migration guide

* Add `@Presents` macro for observable presentation

While it would be nice for the `@PresentationState` property wrapper to
"just work" with TCA's upcoming observable tools, sadly that does not
seem to be the case. Adding observation directly to
`@PresentationState`, as we have done with the beta so far, can break
existing projects due to the additional observation. This primarily
manifests itself in projects that present navigation stacks, where the
`@PresentationState` observation can cause the navigation hierarchy to
recompute and trigger SwiftUI bugs.

The best we've come up with so far is introducing a brand new macro that
automatically wraps a property with `@PresentationState` _and_
instruments it with observation.

We're open to other ideas, and we do have future plans to eliminate the
need for a property wrapper or macro at all, but till then this offers a
non-breaking upgrade path!

* fixes

* Observe child store changes

* wip

* wip

* wip

* Fix typo in MigratingTo1.6.md (#2608)

* Rename bindingViewStore argument to store in MigratingTo1.6.md (#2611)

* wip

* Revert "wip"

This reverts commit f221ed0.

* Add `@Presents` macro for observable presentation (#2604)

* Add `@Presents` macro for observable presentation

While it would be nice for the `@PresentationState` property wrapper to
"just work" with TCA's upcoming observable tools, sadly that does not
seem to be the case. Adding observation directly to
`@PresentationState`, as we have done with the beta so far, can break
existing projects due to the additional observation. This primarily
manifests itself in projects that present navigation stacks, where the
`@PresentationState` observation can cause the navigation hierarchy to
recompute and trigger SwiftUI bugs.

The best we've come up with so far is introducing a brand new macro that
automatically wraps a property with `@PresentationState` _and_
instruments it with observation.

We're open to other ideas, and we do have future plans to eliminate the
need for a property wrapper or macro at all, but till then this offers a
non-breaking upgrade path!

* wip

* Fix perception bindings (#2609)

* Fix runtime warning when binding accesses perceptible state.

* Fix runtime warning in SwiftUI bindings.

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: Stephen Celis <[email protected]>

* wip

* wip

* fix

* wip

* wip

* wip

* Check observable state identity for presentation state.

* Add willSset/didSet to registrar types.

* clean up @presents

* clean up

* fix

* Emit observation warnings in escaping contexts like `ForEach` and `sheet` (#2613)

* Fix perception warning in ForEach.

* fix

---------

Co-authored-by: Brandon Williams <[email protected]>

* Introduce @ViewAction(for:) macro. (#2612)

* Add back @ViewAction macro.

* wip

* wip

* wip

* wip

* wip

* clean up

* wip

* wip

* fix migration guide'

* ViewActionable

* wip

* rename

* wip

* wip

---------

Co-authored-by: Stephen Celis <[email protected]>

* Introduce @BindableStore for bindings in pre-iOS 17 (#2610)

* Introduce @BindableStore.

* docs

* wip

* wip

* fixc

* wip

* wip

* wip

* wip

---------

Co-authored-by: Stephen Celis <[email protected]>

* re-record intergration logs

* wip

* wip

* localize invalid stores to store collection

* Deprecate closure-based `store.scope` operations (#2618)

These uncached operations can be problematic, especially when working
with observation, which often depends on the stable identity of stores.

* document

* Update warning message

* Performance Improvement: Skip perception checks when calling reducers. (#2622)

* Skip perception checks when calling reducers.

* inline withoutPerceptionChecking() for RELEASE

Co-authored-by: Brandon Williams <[email protected]>

---------

Co-authored-by: Brandon Williams <[email protected]>

* Don't show perception warnings in action closures. (#2614)

* Don't show perception warnings in action closures.

* wip

* wip

* wip

* clean up

* wip

---------

Co-authored-by: Stephen Celis <[email protected]>

* fix BindableStore + release

* Add docs

* Change associated type names of ViewActionSending (#2629)

* Fix some @ViewAction annoyances.

* wip

* wip

* wip

* wip

* wip

* wip

* fix

* wip

* fixed merge

* Add new view modifiers for observing alerts/dialogs (#2628)

* Add new view modifiers for observing alerts/dialogs

Instead of:

```swift
.alert(store: store.scope(state: \.$alert, action: \.alert))
```

You can now do:

```swift
.alert($store.scope(state: \.alert, action: \.alert))
```

This new modifier is powered by the same store binding scope operation
that can power `sheet(item:)`, etc., and is much lighter weight than the
previous view modifier, which spun up view stores and `WithViewStore`
views.

* wip

* wip

* wip

---------

Co-authored-by: Brandon Williams <[email protected]>

* Fix uncached warning when using Store.ifLet (#2625)

* Fix uncached warning when using Store.ifLet

* wip

* wip

* wip

* wip

* wip

* wip

---------

Co-authored-by: Stephen Celis <[email protected]>

* Resolve packages

* Updated scopes

* wip

* wip

* updated binding docs

* adding docs

* clean up

* wip

* wip

* wip

* clean up

* clean up

* clean up

* wip;

* lots of fixes

* update more docs

* fix

* wip

* wip

* Remove ObservationRegistrarWrapper. (#2634)

* Remove ObservationRegistrarWrapper.

* Delete Sources/ComposableArchitecture/Internal/ObservationRegistrarWrapper.swift

---------

Co-authored-by: Stephen Celis <[email protected]>

* more docs

* update docs

* a few more tests

* fix

* wip

* wip

* wip

* Cache data in store collections (#2635)

* fix tutorial highlighting

* wip

* wip

* wip

* wip

* tests for observation of special domain types

* another test

* fix

* wip

* Implement memoization for perception checks (#2630)

* Implement memoization for isInSwiftUIBody

* tidy up

* Perception caching updates (#2649)

* Small updates to perception caching.

* wip

* debug

* some more macro tests

* syncups tutorial beginnings

* wip

* wip

* wip

* wip

* wip

* merge fixes

* wip

* update tests

* fix

* fix

* fix perception checking in store

* rename task local

* delete old test

* deprecate test using old apis

* fix test

* perception tests for store

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Opt out of key path for Store.ifLet

* sync ups

* lots more sync up tutorial

* more sync ups tutorial

* wip

* wip

* wio

* wip

* wip

* wip

* updated references of 1.6 to 1.7

* wip

* no need to force unwrap here

* fixed crash in ForEach with bindings

* more sync ups tutorial

* more sync ups tutorial

* wip

* more sync ups

* wip

* wip

* Better support for observing copies of values (#2650)

* Explore using _modify

* wip

* wip

* wip

* wip

* wip

* wip

* more tests

* wip

* get another failing test for an edge case

* wip

* tests all passing

* flag for determining when new state was created

* wip

* clean up

* wip

* wip

* wip;

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* New test that currently fails.

* wip

* wip

* Update Sources/ComposableArchitectureMacros/PresentsMacro.swift

* wip

* remove redundant attached member attribute

* storage

* cleanup

* more benchmarks and tests

* wip

* wip

* wip

* wip

* update tests

* wip

* wip

---------

Co-authored-by: Brandon Williams <[email protected]>

* wip

* wip

* wip

* swift-format

* fix

* wip

* wip

* wip

* wip

* Perception

* wip

* wip

* clean up shared state

* fix shared state tests

* wip

* add alert test

* wip

* wip

* wip

* wip

* Use transaction in binding

* wip

* wip

* wip

* wip

* wip

* wip

* uikit

* keep references to controllers when presenting so that we can properly dismiss

* change order of features in shared state demo

* wip

* cleanup

* cleanup

* wip

* wip

* wip

* Fix perception checking for effect actions.

* wip

* wip

* wip

* Fix perception checking for effect actions.

* wip

* wip

* remove sync ups tutorial

* wip

* wip

* wip

* wip

* wip

* docs for observe function for uikit

* Add cancellation to observation'

* re-record integration test snapshots

* fixed some todos

* update test

* remove 5.9.2 checks

* wip

* improve docs

* update docs

* updates

* lots of fixes

* more docs

* remove unneeded file;

* wip

* wip

* wip

* update readme and getting started

* wip

* simplify

* migration stuff

* wip

* Update Models.swift

* wip

* wip

* wip

* Update Bindings.md

* wip

* wip

* wip

* wip

* fix

* wip

* wip

* wip

* wip

* wip

Co-authored-by: Kabir Oberai <[email protected]>

---------

Co-authored-by: Brandon Williams <[email protected]>
Co-authored-by: hmhv <[email protected]>
Co-authored-by: Jimmy Prime <[email protected]>
Co-authored-by: Michael Pohl <[email protected]>
Co-authored-by: Brandon Williams <[email protected]>
Co-authored-by: George Scott <[email protected]>
Co-authored-by: Kabir Oberai <[email protected]>
  • Loading branch information
8 people authored Jan 27, 2024
1 parent 4465e4e commit c373d8e
Show file tree
Hide file tree
Showing 357 changed files with 17,188 additions and 8,116 deletions.
68 changes: 52 additions & 16 deletions .github/package.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/combine-schedulers",
"state" : {
"revision" : "0625932976b3ae23949f6b816d13bd97f3b40b7c",
"version" : "0.10.0"
"revision" : "9dc9cbe4bc45c65164fa653a563d8d8db61b09bb",
"version" : "1.0.0"
}
},
{
Expand All @@ -32,17 +32,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "fc45e7b2cfece9dd80b5a45e6469ffe67fe67984",
"version" : "0.14.1"
"revision" : "bba1111185863c9288c5f047770f421c3b7793a4",
"version" : "1.1.3"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "f9acfa1a45f4483fe0f2c434a74e6f68f865d12d",
"version" : "0.3.0"
"revision" : "a8421d68068d8f45fbceb418fbf22c5dad4afd33",
"version" : "1.0.2"
}
},
{
Expand All @@ -54,22 +54,31 @@
"version" : "1.0.4"
}
},
{
"identity" : "swift-concurrency-extras",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-concurrency-extras",
"state" : {
"revision" : "bb5059bde9022d69ac516803f4f227d8ac967f71",
"version" : "1.1.0"
}
},
{
"identity" : "swift-custom-dump",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-custom-dump",
"state" : {
"revision" : "505aa98716275fbd045d8f934fee3337c82ffbd3",
"version" : "0.10.3"
"revision" : "aedcf6f4cd486ccef5b312ccac85d4b3f6e58605",
"version" : "1.1.2"
}
},
{
"identity" : "swift-dependencies",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "25c9b6789b4b7ada649a3808e6d8de1489082a33",
"version" : "0.5.0"
"revision" : "c31b1445c4fae49e6fdb75496b895a3653f6aefc",
"version" : "1.1.5"
}
},
{
Expand All @@ -95,26 +104,53 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-identified-collections",
"state" : {
"revision" : "ad3932d28c2e0a009a0167089619526709ef6497",
"version" : "0.7.0"
"revision" : "d1e45f3e1eee2c9193f5369fa9d70a6ddad635e8",
"version" : "1.0.0"
}
},
{
"identity" : "swift-macro-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-macro-testing",
"state" : {
"revision" : "10dcef36314ddfea6f60442169b0b320204cbd35",
"version" : "0.2.2"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"state" : {
"revision" : "59b663f68e69f27a87b45de48cb63264b8194605",
"version" : "1.15.1"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax",
"state" : {
"revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036",
"version" : "509.0.2"
}
},
{
"identity" : "swiftui-navigation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swiftui-navigation",
"state" : {
"revision" : "47dd574b900ba5ba679f56ea00d4d282fc7305a6",
"version" : "0.7.1"
"revision" : "78f9d72cf667adb47e2040aa373185c88c63f0dc",
"version" : "1.2.0"
}
},
{
"identity" : "xctest-dynamic-overlay",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "4af50b38daf0037cfbab15514a241224c3f62f98",
"version" : "0.8.5"
"revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
"version" : "1.0.2"
}
}
],
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- release
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Select Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Run ${{ matrix.config }} tests
run: make CONFIG=${{ matrix.config }} test-library

Expand All @@ -34,8 +34,8 @@ jobs:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Select Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Build for library evolution
run: make build-for-library-evolution

Expand All @@ -59,8 +59,8 @@ jobs:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Select Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Run benchmark
run: make benchmark

Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode 15.1
run: sudo xcode-select -s /Applications/Xcode_15.1.app
- name: Select Xcode 15.2
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Run tests
run: make test-examples
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "40773cbaf8d71ed5357f297b1ba4073f5b24faaa",
"version" : "1.1.0"
"revision" : "bba1111185863c9288c5f047770f421c3b7793a4",
"version" : "1.1.3"
}
},
{
Expand All @@ -50,8 +50,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "a902f1823a7ff3c9ab2fba0f992396b948eda307",
"version" : "1.0.5"
"revision" : "d029d9d39c87bed85b1c50adee7c41795261a192",
"version" : "1.0.6"
}
},
{
Expand All @@ -77,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-dependencies",
"state" : {
"revision" : "63301f4a181ed9aefb46dccef2dfb66466798341",
"version" : "1.1.1"
"revision" : "c31b1445c4fae49e6fdb75496b895a3653f6aefc",
"version" : "1.1.5"
}
},
{
Expand Down Expand Up @@ -117,13 +117,22 @@
"version" : "0.2.2"
}
},
{
"identity" : "swift-perception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-perception",
"state" : {
"revision" : "42240120b2a8797595433288ab4118f8042214c3",
"version" : "1.1.1"
}
},
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state" : {
"revision" : "4862d48562483d274a2ac7522d905c9237a31a48",
"version" : "1.15.0"
"revision" : "59b663f68e69f27a87b45de48cb63264b8194605",
"version" : "1.15.1"
}
},
{
Expand Down
8 changes: 0 additions & 8 deletions Examples/CaseStudies/CaseStudies.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
DC4C6EB62450DD380066A05D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC4C6EB42450DD380066A05D /* LaunchScreen.storyboard */; };
DC4C6EC12450DD390066A05D /* UIKitCaseStudiesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4C6EC02450DD390066A05D /* UIKitCaseStudiesTests.swift */; };
DC4C6ED62450E1050066A05D /* CounterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4C6ED52450E1050066A05D /* CounterViewController.swift */; };
DC4C6ED82450E4570066A05D /* UIViewRepresented.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4C6ED72450E4570066A05D /* UIViewRepresented.swift */; };
DC4C6EDA2450E6050066A05D /* NavigateAndLoad.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4C6ED92450E6050066A05D /* NavigateAndLoad.swift */; };
DC5B505125C86EBC000D8DFD /* 01-GettingStarted-Bindings-Forms.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC5B505025C86EBC000D8DFD /* 01-GettingStarted-Bindings-Forms.swift */; };
DC630FDA2451016B00BAECBA /* ListsOfState.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC630FD92451016B00BAECBA /* ListsOfState.swift */; };
Expand Down Expand Up @@ -199,7 +198,6 @@
DC4C6EC02450DD390066A05D /* UIKitCaseStudiesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitCaseStudiesTests.swift; sourceTree = "<group>"; };
DC4C6EC22450DD390066A05D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DC4C6ED52450E1050066A05D /* CounterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterViewController.swift; sourceTree = "<group>"; };
DC4C6ED72450E4570066A05D /* UIViewRepresented.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIViewRepresented.swift; sourceTree = "<group>"; };
DC4C6ED92450E6050066A05D /* NavigateAndLoad.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateAndLoad.swift; sourceTree = "<group>"; };
DC5B505025C86EBC000D8DFD /* 01-GettingStarted-Bindings-Forms.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "01-GettingStarted-Bindings-Forms.swift"; sourceTree = "<group>"; };
DC630FD92451016B00BAECBA /* ListsOfState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListsOfState.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -313,7 +311,6 @@
children = (
DC25DC632450F2DF00082E81 /* ActivityIndicatorViewController.swift */,
DC25DC5E2450F13200082E81 /* IfLetStoreController.swift */,
DC4C6ED72450E4570066A05D /* UIViewRepresented.swift */,
);
path = Internal;
sourceTree = "<group>";
Expand Down Expand Up @@ -706,7 +703,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DC4C6ED82450E4570066A05D /* UIViewRepresented.swift in Sources */,
DC25DC642450F2DF00082E81 /* ActivityIndicatorViewController.swift in Sources */,
DC4C6ED62450E1050066A05D /* CounterViewController.swift in Sources */,
DC4C6EDA2450E6050066A05D /* NavigateAndLoad.swift in Sources */,
Expand Down Expand Up @@ -835,7 +831,6 @@
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 13.3;
};
name = Debug;
};
Expand All @@ -855,7 +850,6 @@
SDKROOT = appletvos;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 13.3;
};
name = Release;
};
Expand All @@ -877,7 +871,6 @@
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tvOSCaseStudies.app/tvOSCaseStudies";
TVOS_DEPLOYMENT_TARGET = 13.3;
};
name = Debug;
};
Expand All @@ -899,7 +892,6 @@
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/tvOSCaseStudies.app/tvOSCaseStudies";
TVOS_DEPLOYMENT_TARGET = 13.3;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ private let readMe = """

@Reducer
struct AlertAndConfirmationDialog {
@ObservableState
struct State: Equatable {
@PresentationState var alert: AlertState<Action.Alert>?
@PresentationState var confirmationDialog: ConfirmationDialogState<Action.ConfirmationDialog>?
@Presents var alert: AlertState<Action.Alert>?
@Presents var confirmationDialog: ConfirmationDialogState<Action.ConfirmationDialog>?
var count = 0
}

Expand Down Expand Up @@ -106,29 +107,23 @@ struct AlertAndConfirmationDialog {
// MARK: - Feature view

struct AlertAndConfirmationDialogView: View {
@State var store = Store(initialState: AlertAndConfirmationDialog.State()) {
@Bindable var store = Store(initialState: AlertAndConfirmationDialog.State()) {
AlertAndConfirmationDialog()
}

var body: some View {
WithViewStore(self.store, observe: { $0 }) { viewStore in
Form {
Section {
AboutView(readMe: readMe)
}

Text("Count: \(viewStore.count)")
Button("Alert") { viewStore.send(.alertButtonTapped) }
Button("Confirmation Dialog") { viewStore.send(.confirmationDialogButtonTapped) }
Form {
Section {
AboutView(readMe: readMe)
}

Text("Count: \(store.count)")
Button("Alert") { store.send(.alertButtonTapped) }
Button("Confirmation Dialog") { store.send(.confirmationDialogButtonTapped) }
}
.navigationTitle("Alerts & Dialogs")
.alert(
store: self.store.scope(state: \.$alert, action: \.alert)
)
.confirmationDialog(
store: self.store.scope(state: \.$confirmationDialog, action: \.confirmationDialog)
)
.alert($store.scope(state: \.alert, action: \.alert))
.confirmationDialog($store.scope(state: \.confirmationDialog, action: \.confirmationDialog))
}
}

Expand Down
Loading

0 comments on commit c373d8e

Please sign in to comment.