Let's say I have some view initally filled with some data. Than I fetch data over network and want to update view with this updated data.
At this point I want to create Driver from this observable to drive UI elements. However in case of error in observable I don't want to do anything, as the view has already some data so I just want to ignore such error. asDriver() function wants to define what should be done in case of error. Is it ok to do it like this:
let dataUpdated: Observable<DataItem> = ...
let driver = dataUpdated.asDriver(onErrorDriveWith: Driver<DataItem>.empty())
?
Why are you not using
catchErrorJustReturn(DataItem())
?