From ae491c9e3f66631e72d58db8bb4c27dfc3d3afd4 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Mon, 8 Jan 2024 10:25:52 -0800 Subject: [PATCH] Fix tutorial indentiation for diffs --- .../01-01-01-code-0002.swift | 2 +- .../01-01-01-code-0003.swift | 6 +++--- .../01-01-01-code-0004.swift | 2 +- .../01-01-01-code-0005.swift | 8 ++++---- .../01-01-01-code-0006.swift | 6 +++--- .../01-01-02-code-0002.swift | 2 +- .../01-01-02-code-0003.swift | 4 ++-- .../01-01-02-code-0004-previous.swift | 4 ++-- .../01-01-02-code-0004.swift | 4 ++-- .../01-01-03-code-0003.swift | 2 +- .../01-01-03-code-0004.swift | 2 +- .../01-02-01-code-0001-previous.swift | 4 ++-- .../01-02-01-code-0001.swift | 4 ++-- .../01-02-01-code-0002.swift | 6 +++--- .../01-02-01-code-0003.swift | 6 +++--- .../01-02-01-code-0004.swift | 8 ++++---- .../01-02-01-code-0005.swift | 14 +++++++------- .../01-02-02-code-0001.swift | 8 ++++---- .../01-02-02-code-0002.swift | 8 ++++---- .../01-02-02-code-0003.swift | 8 ++++---- .../01-02-02-code-0004.swift | 10 +++++----- .../01-02-02-code-0005.swift | 10 +++++----- .../01-02-03-code-0001.swift | 8 ++++---- .../01-02-03-code-0002.swift | 12 ++++++------ .../01-02-03-code-0003.swift | 12 ++++++------ .../01-02-03-code-0004.swift | 14 +++++++------- .../01-02-03-code-0005.swift | 16 ++++++++-------- .../01-02-03-code-0006.swift | 16 ++++++++-------- .../01-03-01-code-0001.swift | 2 +- .../01-03-01-code-0003.swift | 2 +- .../01-03-01-code-0004.swift | 2 +- .../01-03-01-code-0005.swift | 2 +- .../01-03-02-code-0002.swift | 2 +- .../01-03-02-code-0003.swift | 2 +- .../01-03-02-code-0004.swift | 2 +- .../01-03-02-code-0005.swift | 2 +- .../01-03-02-code-0006.swift | 2 +- .../01-03-02-code-0007.swift | 2 +- .../01-03-02-code-0008.swift | 18 +++++++++--------- .../01-03-02-code-0009.swift | 2 +- .../01-03-02-code-0010.swift | 4 ++-- .../01-03-03-code-0002.swift | 2 +- .../01-03-03-code-0003.swift | 2 +- .../01-03-03-code-0004.swift | 2 +- .../01-03-03-code-0005.swift | 2 +- .../01-03-04-code-0005.swift | 18 +++++++++--------- .../01-03-04-code-0006-previous.swift | 2 +- .../01-03-04-code-0006.swift | 2 +- .../01-03-04-code-0007.swift | 2 +- .../01-03-04-code-0008.swift | 2 +- .../01-04-01-code-0001.swift | 2 +- .../01-04-01-code-0002.swift | 2 +- .../01-04-01-code-0003.swift | 4 ++-- .../01-04-02-code-0001.swift | 2 +- .../01-04-02-code-0005.swift | 2 +- .../01-04-02-code-0007.swift | 2 +- .../01-04-02-code-0008.swift | 2 +- .../01-04-03-code-0001-previous.swift | 4 ++-- .../01-04-03-code-0001.swift | 4 ++-- .../01-04-03-code-0002.swift | 4 ++-- .../01-04-03-code-0003.swift | 4 ++-- .../01-04-03-code-0004.swift | 4 ++-- .../01-04-03-code-0005-previous.swift | 2 +- .../01-04-03-code-0005.swift | 2 +- .../02-01-01-code-0001.swift | 2 +- .../02-01-01-code-0003.swift | 4 ++-- .../02-01-01-code-0004.swift | 2 +- .../02-01-02-code-0003.swift | 2 +- .../02-01-02-code-0004.swift | 2 +- .../02-01-02-code-0005.swift | 2 +- .../02-01-02-code-0006.swift | 4 ++-- .../02-01-02-code-0007.swift | 6 +++--- .../02-01-02-code-0008.swift | 2 +- .../02-01-02-code-0009.swift | 2 +- .../02-01-04-code-0000-previous.swift | 4 ++-- .../02-01-04-code-0000.swift | 4 ++-- .../02-01-04-code-0001.swift | 6 +++--- .../02-01-04-code-0002.swift | 6 +++--- .../02-01-04-code-0003-previous.swift | 6 +++--- .../02-01-04-code-0003.swift | 6 +++--- .../02-01-04-code-0004-previous.swift | 6 +++--- .../02-01-04-code-0004.swift | 6 +++--- .../02-01-04-code-0005.swift | 6 +++--- .../02-01-04-code-0006.swift | 6 +++--- .../02-01-04-code-0007-previous.swift | 6 +++--- .../02-01-04-code-0007.swift | 6 +++--- .../02-02-01-code-0000-previous.swift | 4 ++-- .../02-02-01-code-0000.swift | 6 +++--- .../02-02-01-code-0001.swift | 6 +++--- .../02-02-01-code-0002.swift | 6 +++--- .../02-02-01-code-0003.swift | 6 +++--- .../02-02-01-code-0004.swift | 6 +++--- .../02-02-01-code-0005.swift | 10 +++++----- .../02-02-01-code-0006-previous.swift | 2 +- .../02-02-01-code-0006.swift | 2 +- .../02-02-01-code-0007.swift | 2 +- .../02-02-02-code-0007-previous.swift | 10 +++++----- .../02-02-02-code-0007.swift | 10 +++++----- .../02-02-02-code-0008.swift | 10 +++++----- .../02-02-02-code-0009.swift | 10 +++++----- .../02-02-02-code-0010.swift | 8 ++++---- .../02-02-02-code-0011.swift | 6 +++--- .../02-02-02-code-0012.swift | 8 ++++---- .../02-02-02-code-0013.swift | 8 ++++---- .../02-02-02-code-0014.swift | 8 ++++---- .../02-02-02-code-0015-previous.swift | 2 +- .../02-02-02-code-0015.swift | 2 +- .../02-02-02-code-0016.swift | 2 +- .../02-03-01-code-0002.swift | 2 +- .../02-03-01-code-0003.swift | 2 +- .../02-03-01-code-0004.swift | 2 +- .../02-03-01-code-0005.swift | 2 +- .../02-03-01-code-0006-previous.swift | 6 +++--- .../02-03-01-code-0006.swift | 6 +++--- .../02-03-01-code-0007.swift | 6 +++--- .../02-03-01-code-0008-previous.swift | 2 +- .../02-03-01-code-0008.swift | 2 +- .../02-03-01-code-0009.swift | 2 +- .../02-03-01-code-0010.swift | 2 +- .../02-03-01-code-0011.swift | 2 +- .../02-03-01-code-0012.swift | 2 +- .../02-03-01-code-0013.swift | 2 +- .../02-03-01-code-0014.swift | 2 +- .../02-03-01-code-0015.swift | 2 +- .../02-03-02-code-0002.swift | 2 +- .../02-03-02-code-0003.swift | 2 +- .../02-03-02-code-0004.swift | 2 +- .../02-03-02-code-0005.swift | 2 +- .../02-03-02-code-0006.swift | 2 +- .../02-03-03-code-0003.swift | 2 +- .../02-03-03-code-0004.swift | 2 +- .../02-03-03-code-0005.swift | 2 +- .../02-03-03-code-0007-previous.swift | 6 +++--- .../02-03-03-code-0007.swift | 6 +++--- .../02-03-03-code-0008-previous.swift | 2 +- .../02-03-03-code-0008.swift | 2 +- .../02-03-03-code-0009.swift | 2 +- .../02-03-03-code-0010.swift | 2 +- .../02-04-01-code-0005.swift | 2 +- .../02-04-01-code-0006.swift | 2 +- .../02-04-01-code-0007.swift | 2 +- .../02-04-02-code-0000-previous.swift | 6 +++--- .../02-04-02-code-0000.swift | 6 +++--- .../02-04-02-code-0001.swift | 8 ++++---- .../02-04-02-code-0002.swift | 8 ++++---- .../02-04-02-code-0003-previous.swift | 2 +- .../02-04-02-code-0003.swift | 2 +- .../02-04-02-code-0004.swift | 2 +- .../02-04-02-code-0005-previous.swift | 2 +- .../02-04-02-code-0005.swift | 2 +- .../02-04-03-code-0003-previous.swift | 2 +- .../02-04-03-code-0003.swift | 2 +- .../02-04-03-code-0004-previous.swift | 8 ++++---- .../02-04-03-code-0004.swift | 10 +++++----- 154 files changed, 350 insertions(+), 350 deletions(-) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0002.swift index 713fabd94519..013710b2ce02 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0002.swift @@ -2,5 +2,5 @@ import ComposableArchitecture @Reducer struct CounterFeature { - + } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0003.swift index 4470bbf87359..efbd26680f4e 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0003.swift @@ -3,10 +3,10 @@ import ComposableArchitecture @Reducer struct CounterFeature { struct State { - + } - + enum Action { - + } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0004.swift index edb91654dd1f..3473ea4a42cb 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0004.swift @@ -5,7 +5,7 @@ struct CounterFeature { struct State { var count = 0 } - + enum Action { case decrementButtonTapped case incrementButtonTapped diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0005.swift index 6e4fd79f3c80..c04de342bc9b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0005.swift @@ -5,19 +5,19 @@ struct CounterFeature { struct State { var count = 0 } - + enum Action { case decrementButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { case .decrementButtonTapped: - + case .incrementButtonTapped: - + } } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0006.swift index 29122ab8bd6b..057db93ed196 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-01-code-0006.swift @@ -5,19 +5,19 @@ struct CounterFeature { struct State { var count = 0 } - + enum Action { case decrementButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { case .decrementButtonTapped: state.count -= 1 return .none - + case .incrementButtonTapped: state.count += 1 return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0002.swift index a5d4957377d0..e7c0179be707 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0002.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { EmptyView() } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0003.swift index b7abece50658..e5d63adaa2b6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0003.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { VStack { Text("0") @@ -15,7 +15,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { } .font(.largeTitle) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004-previous.swift index 6e67bddbde63..877e9f5e3fb5 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004-previous.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { VStack { Text("0") @@ -15,7 +15,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { } .font(.largeTitle) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004.swift index 9d00d53bda54..993b9f56b6a6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-02-code-0004.swift @@ -2,7 +2,7 @@ extension CounterFeature.State: Equatable {} struct CounterView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in VStack { @@ -19,7 +19,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { viewStore.send(.incrementButtonTapped) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0003.swift index 8909a4a50635..1607bc03f2ba 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0003.swift @@ -6,7 +6,7 @@ struct MyApp: App { static let store = Store(initialState: CounterFeature.State()) { CounterFeature() } - + var body: some Scene { WindowGroup { CounterView(store: MyApp.store) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0004.swift index e379dfb8f805..610875efbd51 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/01-YourFirstFeature/01-01-03-code-0004.swift @@ -7,7 +7,7 @@ struct MyApp: App { CounterFeature() ._printChanges() } - + var body: some Scene { WindowGroup { CounterView(store: MyApp.store) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001-previous.swift index 7b30c6a51071..161673f97757 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001-previous.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in VStack { @@ -17,7 +17,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { viewStore.send(.incrementButtonTapped) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001.swift index c88b6505da2e..84e5f53ab5d6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0001.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in VStack { @@ -17,7 +17,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { viewStore.send(.incrementButtonTapped) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0002.swift index 44719384c794..3344be11676f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0002.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in VStack { @@ -17,7 +17,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { viewStore.send(.incrementButtonTapped) } @@ -33,7 +33,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + if viewStore.isLoading { ProgressView() } else if let fact = viewStore.fact { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0003.swift index 1741e5e2574f..6d39bf1da31a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0003.swift @@ -5,19 +5,19 @@ struct CounterFeature { struct State: Equatable { var count = 0 } - + enum Action { case decrementButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { case .decrementButtonTapped: state.count -= 1 return .none - + case .incrementButtonTapped: state.count += 1 return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0004.swift index cdea5e8e8f67..570ba0b9b25b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0004.swift @@ -7,13 +7,13 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -21,12 +21,12 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0005.swift index 387c8ea46387..8fe77e6f14e4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-01-code-0005.swift @@ -7,13 +7,13 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -21,21 +21,21 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true - + let (data, _) = try await URLSession.shared .data(from: URL(string: "http://numbersapi.com/\(state.count)")!) // 🛑 'async' call in a function that does not support concurrency // 🛑 Errors thrown from here are not handled - + state.fact = String(decoding: data, as: UTF8.self) state.isLoading = false - + return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0001.swift index c9a46bbb4095..1eed402dd2a6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0001.swift @@ -7,13 +7,13 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -21,14 +21,14 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true return .run { send in // ✅ Do async work in here, and send actions back into the system. } - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0002.swift index 326afe02dfe8..d99b51394b2c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0002.swift @@ -7,13 +7,13 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -21,7 +21,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -30,7 +30,7 @@ struct CounterFeature { .data(from: URL(string: "http://numbersapi.com/\(count)")!) let fact = String(decoding: data, as: UTF8.self) } - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0003.swift index a681616bbdc7..9f15068e5287 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0003.swift @@ -7,13 +7,13 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -21,7 +21,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -33,7 +33,7 @@ struct CounterFeature { // 🛑 Mutable capture of 'inout' parameter 'state' is not allowed in // concurrently-executing code } - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0004.swift index d5dd1af3db2d..4ae4c1e4e4e9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0004.swift @@ -7,14 +7,14 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case factResponse(String) case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -22,7 +22,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -32,12 +32,12 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0005.swift index d5dd1af3db2d..4ae4c1e4e4e9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-02-code-0005.swift @@ -7,14 +7,14 @@ struct CounterFeature { var fact: String? var isLoading = false } - + enum Action { case decrementButtonTapped case factButtonTapped case factResponse(String) case incrementButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -22,7 +22,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -32,12 +32,12 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0001.swift index 858babbbf228..03508cb0c109 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0001.swift @@ -1,6 +1,6 @@ struct CounterView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in VStack { @@ -17,7 +17,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("+") { viewStore.send(.incrementButtonTapped) } @@ -33,7 +33,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + Button("Fact") { viewStore.send(.factButtonTapped) } @@ -41,7 +41,7 @@ struct CounterView: View { .padding() .background(Color.black.opacity(0.1)) .cornerRadius(10) - + if viewStore.isLoading { ProgressView() } else if let fact = viewStore.fact { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0002.swift index 5c16b216bd25..73f1861efa6d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0002.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -16,7 +16,7 @@ struct CounterFeature { case incrementButtonTapped case toggleTimerButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -24,7 +24,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -34,17 +34,17 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() return .run { send in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0003.swift index 6df4a8de8199..b79903217b26 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0003.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -16,7 +16,7 @@ struct CounterFeature { case incrementButtonTapped case toggleTimerButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -24,7 +24,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -34,17 +34,17 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() return .run { send in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0004.swift index 0c6c43011227..da70685bc6b9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0004.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -17,7 +17,7 @@ struct CounterFeature { case timerTick case toggleTimerButtonTapped } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -25,7 +25,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -35,22 +35,22 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .timerTick: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() return .run { send in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0005.swift index 7ee0c27ebb8a..26b136b8dc4a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0005.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -17,9 +17,9 @@ struct CounterFeature { case timerTick case toggleTimerButtonTapped } - + enum CancelID { case timer } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -27,7 +27,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -37,22 +37,22 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .timerTick: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() if state.isTimerRunning { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0006.swift index 7ee0c27ebb8a..26b136b8dc4a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/02-AddingSideEffects/01-02-03-code-0006.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -17,9 +17,9 @@ struct CounterFeature { case timerTick case toggleTimerButtonTapped } - + enum CancelID { case timer } - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -27,7 +27,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -37,22 +37,22 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .timerTick: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() if state.isTimerRunning { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift index abf01330adac..b4721bcbf6b4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0001.swift @@ -4,6 +4,6 @@ import XCTest @MainActor final class CounterFeatureTests: XCTestCase { func testCounter() async { - + } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0003.swift index 50bf47133f4e..72a0503025d4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0003.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.incrementButtonTapped) await store.send(.decrementButtonTapped) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift index c0df6799d99a..3f05ff2a9a14 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0004.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.incrementButtonTapped) // ❌ State was not expected to change, but a change occurred: … // diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift index fe7aa0cd1538..80ca4f525343 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-01-code-0005.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.incrementButtonTapped) { $0.count = 1 } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift index e8e65833c938..ca2bf3ae277d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0002.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift index 698f27f563d0..66d3dafbc30d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0003.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift index d2e88a2e7664..5c171d2fbfe1 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0004.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift index cab9ea4b65ad..93cbee4aa38a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0005.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift index ab1eb102437c..391c73ab6428 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0006.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift index 783cc820f8fe..afa02159753c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0007.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0008.swift index ac45f534ee40..a0bc5d94493c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0008.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -17,11 +17,11 @@ struct CounterFeature { case timerTick case toggleTimerButtonTapped } - + enum CancelID { case timer } - + @Dependency(\.continuousClock) var clock - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -29,7 +29,7 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true @@ -39,22 +39,22 @@ struct CounterFeature { let fact = String(decoding: data, as: UTF8.self) await send(.factResponse(fact)) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .timerTick: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() if state.isTimerRunning { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift index 783cc820f8fe..afa02159753c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0009.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift index d32b3b1895ea..7753e7dae5ed 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-02-code-0010.swift @@ -5,13 +5,13 @@ import XCTest final class CounterFeatureTests: XCTestCase { func testTimer() async { let clock = TestClock() - + let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } withDependencies: { $0.continuousClock = clock } - + await store.send(.toggleTimerButtonTapped) { $0.isTimerRunning = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift index 2e5ed4322b96..f836e106bad2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0002.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift index 1127475b63d8..01192ba3696e 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0003.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift index 8aa9a75ad42b..c97837769eeb 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0004.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift index 4fe60ff4e6ec..8b815e08ca6d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-03-code-0005.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0005.swift index a8d6232cdc76..58755f63bed4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0005.swift @@ -8,7 +8,7 @@ struct CounterFeature { var isLoading = false var isTimerRunning = false } - + enum Action { case decrementButtonTapped case factButtonTapped @@ -17,12 +17,12 @@ struct CounterFeature { case timerTick case toggleTimerButtonTapped } - + enum CancelID { case timer } - + @Dependency(\.continuousClock) var clock @Dependency(\.numberFact) var numberFact - + var body: some ReducerOf { Reduce { state, action in switch action { @@ -30,29 +30,29 @@ struct CounterFeature { state.count -= 1 state.fact = nil return .none - + case .factButtonTapped: state.fact = nil state.isLoading = true return .run { [count = state.count] send in try await send(.factResponse(self.numberFact.fetch(count))) } - + case let .factResponse(fact): state.fact = fact state.isLoading = false return .none - + case .incrementButtonTapped: state.count += 1 state.fact = nil return .none - + case .timerTick: state.count += 1 state.fact = nil return .none - + case .toggleTimerButtonTapped: state.isTimerRunning.toggle() if state.isTimerRunning { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift index 8aa9a75ad42b..c97837769eeb 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006-previous.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift index 285e30e297c5..d5dca3fe7215 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0006.swift @@ -7,7 +7,7 @@ final class CounterFeatureTests: XCTestCase { let store = TestStore(initialState: CounterFeature.State()) { CounterFeature() } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift index c16c9b13247b..23155d922a53 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0007.swift @@ -9,7 +9,7 @@ final class CounterFeatureTests: XCTestCase { } withDependencies: { $0.numberFact.fetch = { "\($0) is a good number." } } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift index 5eb5c1d73d76..e7e771006097 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/03-TestingYourFeatures/01-03-04-code-0008.swift @@ -9,7 +9,7 @@ final class CounterFeatureTests: XCTestCase { } withDependencies: { $0.numberFact.fetch = { "\($0) is a good number." } } - + await store.send(.factButtonTapped) { $0.isLoading = true } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0001.swift index 80e28a71421a..b8a623124ba6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0001.swift @@ -3,7 +3,7 @@ import SwiftUI struct AppView: View { var body: some View { TabView { - + } } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0002.swift index bde28b891d99..7980f52c9829 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0002.swift @@ -7,7 +7,7 @@ struct AppView: View { .tabItem { Text("Counter 1") } - + CounterView(store: ???) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0003.swift index e7a8270165ba..2d88fec3bd82 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-01-code-0003.swift @@ -4,14 +4,14 @@ import SwiftUI struct AppView: View { let store1: StoreOf let store2: StoreOf - + var body: some View { TabView { CounterView(store: store1) .tabItem { Text("Counter 1") } - + CounterView(store: store2) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0001.swift index b80c1bcb5f0c..064336dfb2c0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0001.swift @@ -2,5 +2,5 @@ import ComposableArchitecture @Reducer struct AppFeature { - + } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift index ef485306b1c3..a474fa778219 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0005.swift @@ -3,6 +3,6 @@ import XCTest class AppFeatureTests: XCTestCase { func testIncrementInFirstTab() { - + } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift index fcce15c141f1..f210195754c7 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0007.swift @@ -6,7 +6,7 @@ class AppFeatureTests: XCTestCase { let store = TestStore(initialState: AppFeature.State()) { AppFeature() } - + await store.send(.tab1(.incrementButtonTapped)) } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift index 8a9fd47eac18..8c39d8bb0117 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-02-code-0008.swift @@ -6,7 +6,7 @@ class AppFeatureTests: XCTestCase { let store = TestStore(initialState: AppFeature.State()) { AppFeature() } - + await store.send(.tab1(.incrementButtonTapped)) { $0.tab1.count = 1 } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001-previous.swift index f78c21348883..3fb7999d65e9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001-previous.swift @@ -4,14 +4,14 @@ import SwiftUI struct AppView: View { // let store1: StoreOf // let store2: StoreOf - + var body: some View { TabView { CounterView(store: store1) .tabItem { Text("Counter 1") } - + CounterView(store: store2) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001.swift index bc5bcdaf2efa..5e0d962fdcdf 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0001.swift @@ -5,14 +5,14 @@ struct AppView: View { // let store1: StoreOf // let store2: StoreOf let store: StoreOf - + var body: some View { TabView { CounterView(store: store1) .tabItem { Text("Counter 1") } - + CounterView(store: store2) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0002.swift index 07701a1c92f8..bca42629d062 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0002.swift @@ -3,14 +3,14 @@ import SwiftUI struct AppView: View { let store: StoreOf - + var body: some View { TabView { CounterView(store: store.scope(state: \.tab1, action: \.tab1)) .tabItem { Text("Counter 1") } - + CounterView(store: store2) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0003.swift index a90204161107..35503f354280 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0003.swift @@ -3,14 +3,14 @@ import SwiftUI struct AppView: View { let store: StoreOf - + var body: some View { TabView { CounterView(store: store.scope(state: \.tab1, action: \.tab1)) .tabItem { Text("Counter 1") } - + CounterView(store: store.scope(state: \.tab2, action: \.tab2)) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0004.swift index e259fc15003e..fe03dbd46a4a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0004.swift @@ -3,14 +3,14 @@ import SwiftUI struct AppView: View { let store: StoreOf - + var body: some View { TabView { CounterView(store: store.scope(state: \.tab1, action: \.tab1)) .tabItem { Text("Counter 1") } - + CounterView(store: store.scope(state: \.tab2, action: \.tab2)) .tabItem { Text("Counter 2") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005-previous.swift index e379dfb8f805..610875efbd51 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005-previous.swift @@ -7,7 +7,7 @@ struct MyApp: App { CounterFeature() ._printChanges() } - + var body: some Scene { WindowGroup { CounterView(store: MyApp.store) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005.swift index 9fe83d515d33..3ace38f0cb09 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/01-Essentials/04-ComposingFeatures/01-04-03-code-0005.swift @@ -6,7 +6,7 @@ struct MyApp: App { static let store = Store(initialState: AppFeature.State()) { AppFeature() } - + var body: some Scene { WindowGroup { AppView(store: MyApp.store) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0001.swift index 8a552ddffc4c..2cd8ae0071cb 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0001.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0003.swift index cbf36dfe678b..f4df2236d652 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0003.swift @@ -15,10 +15,10 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .none - + case .saveButtonTapped: return .none - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0004.swift index 8e27ea6db1e5..9b53b7f6c2e3 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-01-code-0004.swift @@ -2,7 +2,7 @@ import SwiftUI struct AddContactView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in Form { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0003.swift index 0360005f20d3..7d015504320b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0003.swift @@ -14,7 +14,7 @@ struct ContactsFeature { case .addButtonTapped: // TODO: Handle action return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0004.swift index cf71cf1446b7..2ede7673b9d5 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0004.swift @@ -14,7 +14,7 @@ struct ContactsFeature { case .addButtonTapped: // TODO: Handle action return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0005.swift index a6d777e4a4b0..fcaa6ce6b5cd 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0005.swift @@ -16,7 +16,7 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0006.swift index c4ce3ac7315d..1e9af6006c6c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0006.swift @@ -16,11 +16,11 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact(.presented(.cancelButtonTapped)): state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0007.swift index 0583309201e8..f4ea0c5ea51d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0007.swift @@ -16,18 +16,18 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact(.presented(.cancelButtonTapped)): state.addContact = nil return .none - + case .addContact(.presented(.saveButtonTapped)): guard let contact = state.addContact?.contact else { return .none } state.contacts.append(contact) state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0008.swift index d9fd5ec6d058..c6f4566b6540 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0008.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0009.swift index 9bb568945acf..209ef6704b5d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-02-code-0009.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000-previous.swift index cbf36dfe678b..f4df2236d652 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000-previous.swift @@ -15,10 +15,10 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .none - + case .saveButtonTapped: return .none - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000.swift index 82b0da9881fe..ca6a486dbbb2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0000.swift @@ -20,10 +20,10 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .none - + case .saveButtonTapped: return .none - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0001.swift index 6dc8f9de6c8b..2429008201fe 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0001.swift @@ -20,13 +20,13 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .none - + case .delegate: return .none - + case .saveButtonTapped: return .none - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0002.swift index 66dda2fa5a30..f580aa7cacc3 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0002.swift @@ -20,13 +20,13 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .send(.delegate(.cancel)) - + case .delegate: return .none - + case .saveButtonTapped: return .send(.delegate(.saveContact(state.contact))) - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003-previous.swift index 0583309201e8..f4ea0c5ea51d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003-previous.swift @@ -16,18 +16,18 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact(.presented(.cancelButtonTapped)): state.addContact = nil return .none - + case .addContact(.presented(.saveButtonTapped)): guard let contact = state.addContact?.contact else { return .none } state.contacts.append(contact) state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003.swift index a439a61bfddb..c1832d0070f5 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0003.swift @@ -16,18 +16,18 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact(.presented(.delegate(.cancel))): state.addContact = nil return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): // guard let contact = state.addContact?.contact // else { return .none } state.contacts.append(contact) state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004-previous.swift index 6aca72b5dba1..fc690e76c51a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004-previous.swift @@ -20,13 +20,13 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .send(.delegate(.cancel)) - + case .delegate: return .none - + case .saveButtonTapped: return .send(.delegate(.saveContact(state.contact))) - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004.swift index c6e98dc20526..7c6f30a9b43d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0004.swift @@ -21,13 +21,13 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .send(.delegate(.cancel)) - + case .delegate: return .none - + case .saveButtonTapped: return .send(.delegate(.saveContact(state.contact))) - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0005.swift index 81e42dbbd64d..58b0fc66ca4b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0005.swift @@ -21,16 +21,16 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .run { _ in await self.dismiss() } - + case .delegate: return .none - + case .saveButtonTapped: return .run { [contact = state.contact] send in await send(.delegate(.saveContact(contact))) await self.dismiss() } - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0006.swift index 5a456dba6f0d..dacb0ab16edb 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0006.swift @@ -21,16 +21,16 @@ struct AddContactFeature { switch action { case .cancelButtonTapped: return .run { _ in await self.dismiss() } - + case .delegate: return .none - + case .saveButtonTapped: return .run { [contact = state.contact] send in await send(.delegate(.saveContact(contact))) await self.dismiss() } - + case let .setName(name): state.contact.name = name return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007-previous.swift index 0dbe4ec19ae0..f076e0127675 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007-previous.swift @@ -16,16 +16,16 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case .addContact(.presented(.delegate(.cancel))): state.addContact = nil return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007.swift index 2c833c6c1313..638cb8419e43 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/01-YourFirstPresentation/02-01-04-code-0007.swift @@ -16,16 +16,16 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + // case .addContact(.presented(.delegate(.cancel))): // state.addContact = nil // return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) // state.addContact = nil return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000-previous.swift index 1d0cf392a137..316ece5c963b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000-previous.swift @@ -16,11 +16,11 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000.swift index c227879684d9..942f9bea824c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0000.swift @@ -17,14 +17,14 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .deleteButtonTapped(id: id): return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0001.swift index a186ef946966..ad51f69ad02a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0001.swift @@ -20,14 +20,14 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .deleteButtonTapped(id: id): return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0002.swift index c1a36d309575..e6c8bb29765a 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0002.swift @@ -22,14 +22,14 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .deleteButtonTapped(id: id): return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0003.swift index d64923433577..2ed6803d66c0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0003.swift @@ -22,14 +22,14 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0004.swift index 7c95d0e0a6c0..2e4f28371208 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0004.swift @@ -22,14 +22,14 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0005.swift index 227e1dd6339e..72ba73fa5e55 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0005.swift @@ -22,21 +22,21 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006-previous.swift index 9bb568945acf..209ef6704b5d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006-previous.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006.swift index 2db41405239c..ea40df2f644f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0006.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0007.swift index e197141aff35..c9f13ac740cc 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-01-code-0007.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007-previous.swift index 227e1dd6339e..72ba73fa5e55 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007-previous.swift @@ -22,21 +22,21 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007.swift index ecc78151fb96..1c27ac52711e 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0007.swift @@ -21,21 +21,21 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0008.swift index 2230a46c1068..f344a38adeb6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0008.swift @@ -20,21 +20,21 @@ struct ContactsFeature { contact: Contact(id: UUID(), name: "") ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0009.swift index 772144938990..24ee623e04db 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0009.swift @@ -22,21 +22,21 @@ struct ContactsFeature { ) ) return .none - + case let .addContact(.presented(.delegate(.saveContact(contact)))): state.contacts.append(contact) return .none - + case .addContact: return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0010.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0010.swift index 0c5af4137ccb..d3e11baaad88 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0010.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0010.swift @@ -22,18 +22,18 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .alert(.presented(.confirmDeletion(id: id))): state.contacts.remove(id: id) return .none - + case .alert: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0011.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0011.swift index f257844bd900..343ec93608cf 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0011.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0011.swift @@ -22,15 +22,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0012.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0012.swift index f9d15e58caa9..58f13213f90c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0012.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0012.swift @@ -22,18 +22,18 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case .destination: return .none - + case let .deleteButtonTapped(id: id): state.alert = AlertState { TextState("Are you sure?") diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0013.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0013.swift index 25fba48a1b52..49324f4a9ed1 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0013.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0013.swift @@ -22,18 +22,18 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case .destination: return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0014.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0014.swift index 130651cdc5af..95bb2c7ed4f4 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0014.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0014.swift @@ -22,18 +22,18 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case .destination: return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015-previous.swift index e197141aff35..c9f13ac740cc 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015-previous.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015.swift index 251dde757d64..9f5cbae276e6 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0015.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0016.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0016.swift index ff8aab8d33f4..731c7df05c88 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0016.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/02-MultipleDestinations/02-02-02-code-0016.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0002.swift index e11967115530..0c9d328a2905 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0002.swift @@ -9,7 +9,7 @@ final class ContactsFeatureTests: XCTestCase { let store = TestStore(initialState: ContactsFeature.State()) { ContactsFeature() } - + await store.send(.addButtonTapped) { } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0003.swift index 421d895bc27c..dfe632a80a06 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0003.swift @@ -9,7 +9,7 @@ final class ContactsFeatureTests: XCTestCase { let store = TestStore(initialState: ContactsFeature.State()) { ContactsFeature() } - + await store.send(.addButtonTapped) { $0.destination = .addContact( ) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0004.swift index 4b7b64abce5c..2e036cde211e 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0004.swift @@ -9,7 +9,7 @@ final class ContactsFeatureTests: XCTestCase { let store = TestStore(initialState: ContactsFeature.State()) { ContactsFeature() } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0005.swift index 452187f5851f..1571534870e9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0005.swift @@ -9,7 +9,7 @@ final class ContactsFeatureTests: XCTestCase { let store = TestStore(initialState: ContactsFeature.State()) { ContactsFeature() } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006-previous.swift index c6ef21c69143..da6491b42282 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006-previous.swift @@ -22,15 +22,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006.swift index 66b9ff69b7cc..ea32d2b6063c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0006.swift @@ -23,15 +23,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0007.swift index a1e3b4d2c44a..098fe24c454c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0007.swift @@ -23,15 +23,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008-previous.swift index 452187f5851f..1571534870e9 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008-previous.swift @@ -9,7 +9,7 @@ final class ContactsFeatureTests: XCTestCase { let store = TestStore(initialState: ContactsFeature.State()) { ContactsFeature() } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008.swift index 796e6f6f3632..5ee81d545fd2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0008.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0009.swift index b25e8d5577bf..d529f8c61ad3 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0009.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0010.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0010.swift index 0f4e0025d154..7c08b8b09d17 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0010.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0010.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0011.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0011.swift index f43af2674b6d..bf5e06407503 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0011.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0011.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0012.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0012.swift index 6934eaa900bf..7c06ad72f0fe 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0012.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0012.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0013.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0013.swift index 23286caa73c8..8d2e9e01d020 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0013.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0013.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0014.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0014.swift index 553dfd427b5d..824f3999ffab 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0014.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0014.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0015.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0015.swift index eaffcf2bbb7e..05cde54f81b8 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0015.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-01-code-0015.swift @@ -11,7 +11,7 @@ final class ContactsFeatureTests: XCTestCase { } withDependencies: { $0.uuid = .incrementing } - + await store.send(.addButtonTapped) { $0.destination = .addContact( AddContactFeature.State( diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0002.swift index 2a23c49a54c3..5242a3635044 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0002.swift @@ -12,7 +12,7 @@ final class ContactsFeatureTests: XCTestCase { $0.uuid = .incrementing } store.exhaustivity = .off - + await store.send(.addButtonTapped) } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0003.swift index 30f2983e0ade..f7b42dfe8471 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0003.swift @@ -12,7 +12,7 @@ final class ContactsFeatureTests: XCTestCase { $0.uuid = .incrementing } store.exhaustivity = .off - + await store.send(.addButtonTapped) await store.send(.destination(.presented(.addContact(.setName("Blob Jr."))))) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0004.swift index 0673e4dcb22d..673788a2c23d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0004.swift @@ -12,7 +12,7 @@ final class ContactsFeatureTests: XCTestCase { $0.uuid = .incrementing } store.exhaustivity = .off - + await store.send(.addButtonTapped) await store.send(.destination(.presented(.addContact(.setName("Blob Jr."))))) await store.send(.destination(.presented(.addContact(.saveButtonTapped)))) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0005.swift index 9cfb558d55ec..1811a2d01d17 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0005.swift @@ -12,7 +12,7 @@ final class ContactsFeatureTests: XCTestCase { $0.uuid = .incrementing } store.exhaustivity = .off - + await store.send(.addButtonTapped) await store.send(.destination(.presented(.addContact(.setName("Blob Jr."))))) await store.send(.destination(.presented(.addContact(.saveButtonTapped)))) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0006.swift index a5536eacfd77..fc7237e2e949 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-02-code-0006.swift @@ -12,7 +12,7 @@ final class ContactsFeatureTests: XCTestCase { $0.uuid = .incrementing } store.exhaustivity = .off - + await store.send(.addButtonTapped) await store.send(.destination(.presented(.addContact(.setName("Blob Jr."))))) await store.send(.destination(.presented(.addContact(.saveButtonTapped)))) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0003.swift index ed9065d9c089..6c4d9c2a51a2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0003.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0004.swift index f8d622f145b6..fd337194bf45 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0004.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert( ) diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0005.swift index 4bc3078b2399..c938d4b46f1d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0005.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007-previous.swift index a1e3b4d2c44a..098fe24c454c 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007-previous.swift @@ -23,15 +23,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007.swift index 31f6bf6a29b9..966175bc0862 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0007.swift @@ -23,15 +23,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008-previous.swift index 0e535fbff3cb..231122f9d80d 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008-previous.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert( AlertState { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008.swift index f1656f08fa77..1cf70d9179d3 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0008.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert(.deleteConfirmation(id: UUID(1))) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0009.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0009.swift index 52aeb3ebfc6b..7d63d5a1742f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0009.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0009.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert(.deleteConfirmation(id: UUID(1))) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0010.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0010.swift index 56a45c5b4c76..fc251b0c06f7 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0010.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/03-TestingPresentation/02-03-03-code-0010.swift @@ -16,7 +16,7 @@ final class ContactsFeatureTests: XCTestCase { ) { ContactsFeature() } - + await store.send(.deleteButtonTapped(id: UUID(1))) { $0.destination = .alert(.deleteConfirmation(id: UUID(1))) } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0005.swift index 06af6976ca66..8d4342ce167b 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0005.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactDetailView: View { let store: StoreOf - + var body: some View { } } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift index 257f79e3aa69..8d903635fdb0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0006.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactDetailView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in Form { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift index 9fdc837ce611..2109d69c7111 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-01-code-0007.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactDetailView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in Form { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000-previous.swift index 31f6bf6a29b9..966175bc0862 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000-previous.swift @@ -23,15 +23,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000.swift index 1f55792c46f1..a5ea240004bc 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0000.swift @@ -24,15 +24,15 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0001.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0001.swift index a23c3906a6bf..bf25b68260c2 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0001.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0001.swift @@ -25,19 +25,19 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none - + case .path: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0002.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0002.swift index 5f05308d8b38..2113343520fe 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0002.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0002.swift @@ -25,19 +25,19 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none - + case .path: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003-previous.swift index ff8aab8d33f4..731c7df05c88 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003-previous.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStack { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003.swift index 9848aa347c34..46154be26904 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStackStore(self.store.scope(state: \.path, action: \.path)) { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0004.swift index 50d9233ee439..e352680581de 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0004.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStackStore(self.store.scope(state: \.path, action: \.path)) { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005-previous.swift index f6d028df9e0c..2b2b47309957 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005-previous.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStackStore(self.store.scope(state: \.path, action: \.path)) { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005.swift index 4a2ab5258467..6bf13b3bdde0 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005.swift @@ -1,6 +1,6 @@ struct ContactsView: View { let store: StoreOf - + var body: some View { NavigationStackStore(self.store.scope(state: \.path, action: \.path)) { WithViewStore(self.store, observe: \.contacts) { viewStore in diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift index 9fdc837ce611..2109d69c7111 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003-previous.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactDetailView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in Form { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift index 6d447e064ca9..78161b5e1272 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0003.swift @@ -2,7 +2,7 @@ import SwiftUI struct ContactDetailView: View { let store: StoreOf - + var body: some View { WithViewStore(self.store, observe: { $0 }) { viewStore in Form { diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004-previous.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004-previous.swift index 5f05308d8b38..2113343520fe 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004-previous.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004-previous.swift @@ -25,19 +25,19 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none - + case .path: return .none } diff --git a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004.swift b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004.swift index f1667ff67ab1..3e1e9df28b7f 100644 --- a/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004.swift +++ b/Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-03-code-0004.swift @@ -25,25 +25,25 @@ struct ContactsFeature { ) ) return .none - + case let .destination(.presented(.addContact(.delegate(.saveContact(contact))))): state.contacts.append(contact) return .none - + case let .destination(.presented(.alert(.confirmDeletion(id: id)))): state.contacts.remove(id: id) return .none - + case let .deleteButtonTapped(id: id): state.destination = .alert(.deleteConfirmation(id: id)) return .none - + case let .path(.element(id: id, action: .delegate(.confirmDeletion))): guard let detailState = state.path[id: id] else { return .none } state.contacts.remove(id: detailState.contact.id) return .none - + case .path: return .none }