Replies: 2 comments 2 replies
-
There is no issue using the first approach if your view doesn't depend on the state, and actions are triggered relatively infrequently (like button pushes for example). |
Beta Was this translation helpful? Give feedback.
-
One thing to note is that if you're not observing any state, be sure to invoke var body: some View {
- WithViewStore(store) { viewStore in
+ WithViewStore(store.stateless) { viewStore in
Button {
viewStore.send(.change)
} label: {
Text("Change")
}
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys, I'm trying to figure out the difference between these two
VS
Often times I find myself only needing to send a single action in a view so i'm keen to use the first, whats the difference?
Beta Was this translation helpful? Give feedback.
All reactions