Using observe with ViewStore #1413
-
Is the any way or guide to use #Problem Compiler error with large view. I want to use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @tunchamroeun, currently you can do this by using let viewStore = ViewStore(store.scope(state: ViewState.init)) But it was an oversight of ours to not add an initializer to |
Beta Was this translation helpful? Give feedback.
-
From 0.42.0 let viewStore = ViewStore(store, observe: ViewState.init) |
Beta Was this translation helpful? Give feedback.
Hi @tunchamroeun, currently you can do this by using
scope
on the store:But it was an oversight of ours to not add an initializer to
ViewStore
like we did forWithViewStore
. We will correct that soon.