Replies: 1 comment 1 reply
-
@toomozoo Another approach would be to put the progress view after the List {
ForEachStore(self.store.scope(state: \.posts, action: Action.post(id:action:))) {
PostView(store: $0)
}
if viewStore.isRequestInFlight {
ProgressView()
} else {
// You could also kick off the request here:
EmptyView().onAppear { viewStore.send(.scrolledToBottom) }
}
} |
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.
-
Hi, I'm working on a view that uses infinite scroll and want to display
ProgressView
after the last item.For example:
This works fine, but is this a good way to compare values using
ViewStore($0).post == viewStore.lastPost
? Or should I not useForEachStore
in this case?Beta Was this translation helpful? Give feedback.
All reactions