Replies: 2 comments 2 replies
-
Why do you have two switchStores in you view? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@takehilo This could be an issue with observing too much state. In this initializer: init(store: Store<ListCore.State, ListCore.Action>) {
self.store = store
self.viewStore = ViewStore(store.scope(state: \.viewState))
} It's not clear what is contained in Another place where more state appears to be observed than necessary is at the item level: let store: Store<ItemCore.State, temCore.Action>
@ObservedObject private var viewStore: ViewStore<ItemCore.State, ItemCore.Action>
init(store: Store<ItemCore.State, ItemCore.Action>) {
self.store = store
self.viewStore = ViewStore(store)
} In the -@ObservedObject private var viewStore: ViewStore<ItemCore.State, ItemCore.Action>
+@ObservedObject private var viewStore: ViewStore<Void, ItemCore.Action>
...
-self.viewStore = ViewStore(store)
+self.viewStore = ViewStore(store.stateless) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Our project uses List and ForEachStore.
Each row of the List consists of various types of views, which are implemented using SwitchStore.
However, this implementation causes scrolling to become choppy/laggy as the number of rows increases due to paging.
Are we implementing it the wrong way?
Beta Was this translation helpful? Give feedback.
All reactions