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
...@@ -26,7 +26,7 @@ struct AppView: View { ...@@ -26,7 +26,7 @@ struct AppView: View {
} }
var body: some View { var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
ZStack { ZStack {
switch viewStore.state { switch viewStore.state {
case .loading: case .loading:
......
...@@ -36,7 +36,7 @@ public struct ContactView: View { ...@@ -36,7 +36,7 @@ public struct ContactView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
Form { Form {
if viewStore.xxContactIsSet { if viewStore.xxContactIsSet {
Section { Section {
......
...@@ -23,7 +23,7 @@ public struct ContactsView: View { ...@@ -23,7 +23,7 @@ public struct ContactsView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
Form { Form {
ForEach(viewStore.contacts) { contact in ForEach(viewStore.contacts) { contact in
if contact.id == viewStore.myId { if contact.id == viewStore.myId {
......
...@@ -28,7 +28,7 @@ public struct HomeView: View { ...@@ -28,7 +28,7 @@ public struct HomeView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView { NavigationView {
Form { Form {
Section { Section {
......
...@@ -24,7 +24,7 @@ public struct RegisterView: View { ...@@ -24,7 +24,7 @@ public struct RegisterView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView { NavigationView {
Form { Form {
Section { Section {
......
...@@ -13,7 +13,7 @@ public struct RestoreView: View { ...@@ -13,7 +13,7 @@ public struct RestoreView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView { NavigationView {
Form { Form {
Section { Section {
......
...@@ -39,7 +39,7 @@ public struct SendRequestView: View { ...@@ -39,7 +39,7 @@ public struct SendRequestView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
Form { Form {
Section { Section {
Button { Button {
......
...@@ -29,7 +29,7 @@ public struct UserSearchView: View { ...@@ -29,7 +29,7 @@ public struct UserSearchView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
Form { Form {
Section { Section {
TextField( TextField(
......
...@@ -17,7 +17,7 @@ public struct WelcomeView: View { ...@@ -17,7 +17,7 @@ public struct WelcomeView: View {
} }
public var body: some View { public var body: some View {
WithViewStore(store.scope(state: ViewState.init)) { viewStore in WithViewStore(store, observe: ViewState.init) { viewStore in
NavigationView { NavigationView {
Form { Form {
Section { Section {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment