Last active
July 15, 2020 14:53
-
-
Save O-O-wl/90860b04fd8407b3f075c43b9f09bebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func handle(_ sideEffect: SideEffect) -> Observable<Action> { | |
switch sideEffect { | |
case .requestAutoCompletions(let query): | |
let autoCompletion = // 비동기 로직 | |
return .just(.fetchAutoCompletion(autoCompletions)) | |
case .requestSearchs(let query): | |
let searchResults = // 비동기 로직 | |
return .just(.fetchSearchResult(searchResults)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment