Post

Replies

Boosts

Views

Created

.debounce() not working as expected
While using .debounce() with networking call it is swallowing the values it receives. With the combine() usage, it is emitting events as expected, but they carry no data. Below is the example code. URLSession.shared.dataTaskPublisher(for: request)       .map(\.data)       .decode(type: AddressList.self, decoder: JSONDecoder())       .debounce(for: 0.3, scheduler: DispatchQueue.main)
4
0
1.5k
Feb ’21