-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
We will convert Compass to be in Swift 4 soon. This is not really big changes, but we can take this advantage to do some refactoring. Some are breaking changes. My proposals are
- Refactor Navigator to be used as instance. And inject
schemeandRouterinto it. An app usually does not need manyNavigator, and use can just set it as the current one. This also promotes the use ofRouter
let navigator = Navigator(scheme: "compass", routers: routers)
Navigator.current = navigator- Right now
NavigatorandRouterseem to confuse users. Like we declareRouter, but also configureNavigator.routes. The aboveNavigator instancewill make the composition clearNavigator -> Router -> Routable - Refactor Router to be more flexible. Not all routers depend on
currentController, some likepreLoginprefers to switch rootViewController - Remove
ErrorRoutable, as we can handle viatry catchwithnavigatefunction
What do you think @hyperoslo/ios ?
vadymmarkov, zenangst, svoip and tpritc
Metadata
Metadata
Assignees
Labels
No labels