wearereasonablepeople / ReRouter

Routing with ReactiveReSwift and RxSwift
MIT License
8 stars 2 forks source link

Refactor from distinctUntilChanged in router #4

Closed alickbass closed 7 years ago

alickbass commented 7 years ago

Basically, we do double work when we do distinctUntilChanged as we after that create the RouteChange that does pretty much the same thing. So we do the same work twice. Instead, we could use the RouteChange and filter for it to be non-empty, as it takes O(1) time