Skip to content
Snippets Groups Projects
Commit 510ab87e authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Update WithViewStore usage

parent 9a30dd55
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!77Messenger example - update dependencies
This commit is part of merge request !77. Comments created here will be created in the context of that merge request.
......@@ -26,7 +26,7 @@ struct AppView: View {
}
var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
ZStack {
switch viewStore.state {
case .loading:
......
......@@ -36,7 +36,7 @@ public struct ContactView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
if viewStore.xxContactIsSet {
Section {
......
......@@ -23,7 +23,7 @@ public struct ContactsView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
ForEach(viewStore.contacts) { contact in
if contact.id == viewStore.myId {
......
......@@ -28,7 +28,7 @@ public struct HomeView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView {
Form {
Section {
......
......@@ -24,7 +24,7 @@ public struct RegisterView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView {
Form {
Section {
......
......@@ -13,7 +13,7 @@ public struct RestoreView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView {
Form {
Section {
......
......@@ -39,7 +39,7 @@ public struct SendRequestView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
Section {
Button {
......
......@@ -29,7 +29,7 @@ public struct UserSearchView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
Form {
Section {
TextField(
......
......@@ -17,7 +17,7 @@ public struct WelcomeView: View {
}
public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in
WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView {
Form {
Section {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment