Skip to content

Commit

Permalink
Set debounce duration to 300ms (#2525)
Browse files Browse the repository at this point in the history
The docs and code comments suggest that the debounce is 300ms, not 3 seconds. This ensures the example works as described.
  • Loading branch information
wtsnz authored Oct 23, 2023
1 parent 10e8492 commit c472ea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/Search/Search/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct SearchView: View {
}
.task(id: viewStore.searchQuery) {
do {
try await Task.sleep(for: .seconds(3))
try await Task.sleep(for: .milliseconds(300))
await viewStore.send(.searchQueryChangeDebounced).finish()
} catch {}
}
Expand Down

0 comments on commit c472ea4

Please sign in to comment.