stateless ViewStore in 1.0? #2344
-
was running a fairly recent version of the prerelease, but am trying to get on 1.0.0 today. got a compiler error where i was doing what's the recommended replacement? or is there some reason why i shouldn't be trying to do have a stateless view store anymore? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi. Recommended replacement for |
Beta Was this translation helpful? Give feedback.
Hi. Recommended replacement for
ViewStore(store.stateless)
is sending the actions directly to the store usingstore.send(.action)
. It also returns StoreTask, so you can even writeMySwiftUIView.task { await store.send(.task).finish() }