Skip to content

Commit f19af6c

Browse files
committed
Update docs to use case key paths
1 parent 1590846 commit f19af6c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0003.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ struct ContactsView: View {
22
let store: StoreOf<ContactsFeature>
33

44
var body: some View {
5-
NavigationStackStore(self.store.scope(state: \.path, action: { .path($0) })) {
5+
NavigationStackStore(self.store.scope(state: \.path, action: \.path)) {
66
WithViewStore(self.store, observe: \.contacts) { viewStore in
77
List {
88
ForEach(viewStore.state) { contact in

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0004.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ struct ContactsView: View {
22
let store: StoreOf<ContactsFeature>
33

44
var body: some View {
5-
NavigationStackStore(self.store.scope(state: \.path, action: { .path($0) })) {
5+
NavigationStackStore(self.store.scope(state: \.path, action: \.path)) {
66
WithViewStore(self.store, observe: \.contacts) { viewStore in
77
List {
88
ForEach(viewStore.state) { contact in

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005-previous.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ struct ContactsView: View {
22
let store: StoreOf<ContactsFeature>
33

44
var body: some View {
5-
NavigationStackStore(self.store.scope(state: \.path, action: { .path($0) })) {
5+
NavigationStackStore(self.store.scope(state: \.path, action: \.path)) {
66
WithViewStore(self.store, observe: \.contacts) { viewStore in
77
List {
88
ForEach(viewStore.state) { contact in

Sources/ComposableArchitecture/Documentation.docc/Tutorials/MeetTheComposableArchitecture/02-Navigation/04-NavigationStacks/02-04-02-code-0005.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ struct ContactsView: View {
22
let store: StoreOf<ContactsFeature>
33

44
var body: some View {
5-
NavigationStackStore(self.store.scope(state: \.path, action: { .path($0) })) {
5+
NavigationStackStore(self.store.scope(state: \.path, action: \.path)) {
66
WithViewStore(self.store, observe: \.contacts) { viewStore in
77
List {
88
ForEach(viewStore.state) { contact in

Sources/ComposableArchitecture/UIKit/IfLetUIKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extension Store {
2020
/// func viewDidLoad() {
2121
/// // ...
2222
/// self.store
23-
/// .scope(state: \.optionalChild, action: { .child($0) })
23+
/// .scope(state: \.optionalChild, action: \.child)
2424
/// .ifLet(
2525
/// then: { [weak self] childStore in
2626
/// self?.navigationController?.pushViewController(

0 commit comments

Comments
 (0)