Routable
public protocol Routable : AnyObjectA Routable is a ViewController that takes active part to the execution of a navigation action.
This is intended to be used in the few cases the RoutableWithConfiguration is not enough.
For instance, if we want a screen A to present B, the ViewController that
is handling A, must conform to the Routable protocol.
Each Routable can be asked by the Navigator to perform a specific navigation task
(like present another ViewController) based on the NavigationAction you dispatch
(see Show or Hide).
   extension TodoListViewController: Routable {
     var routeIdentifier: RouteElementIdentifier: {
       return "todoList"
     }
     func show(indentifier: RouteElementIdentifier,
       from: RouteElementIdentifier,
       animated: Bool,
       context: Any?,
       completion: @escaping RoutingCompletion) -> Bool {
         let vc = NextViewController(store: self.store)
         self.present(vc, animated: animated, completion: completion)
         return true
     }
   }
   extension TodoListViewController: Routable {
     func hide(indentifier: RouteElementIdentifier,
       from: RouteElementIdentifier,
       animated: Bool,
       context: Any?,
       completion: @escaping RoutingCompletion) -> Bool {
         if identifier == self.routeIdentifier {
           self.dismiss(animated: animated, completion: completion)
           return true
         }
         return false
     }
   }
- 
                  
                  The identifier associated to this Routable. extension TodoListViewController: Routable { var routeIdentifier: RouteElementIdentifier: { return "todoList" } }DeclarationSwift var routeIdentifier: RouteElementIdentifier { get }
- 
                  show(identifier:Default implementationfrom: animated: context: completion: ) When a Showaction is dispatched, theNavigatorcan ask this Routable to show another Routable identified byidentifiercalling this method. You must call the completion callback as soon as the navigation is completed. Returntrueif this Routable is handling the action,falseotherwise.extension TodoListViewController: Routable { func show(indentifier: RouteElementIdentifier, from: RouteElementIdentifier, animated: Bool, context: Any?, completion: @escaping RoutingCompletion) -> Bool { let vc = NextViewController(store: self.store) self.present(vc, animated: animated, completion: completion) return true } }Default ImplementationShow a route element DeclarationSwift func show( identifier: RouteElementIdentifier, from: RouteElementIdentifier, animated: Bool, context: Any?, completion: @escaping RoutingCompletion ) -> Bool
- 
                  hide(identifier:Default implementationfrom: animated: context: completion: ) When a Hideaction is dispatched, theNavigatorcan ask this Routable to hide itself or another Routable identified byidentifiercalling this method. Returntrueif this Routable is handling the action,falseotherwise.extension TodoListViewController: Routable { func hide(indentifier: RouteElementIdentifier, from: RouteElementIdentifier, animated: Bool, context: Any?, completion: @escaping RoutingCompletion) -> Bool { if identifier == self.routeIdentifier { self.dismiss(animated: animated, completion: completion) return true } return false } }Default ImplementationHide a route element DeclarationSwift func hide( identifier: RouteElementIdentifier, from: RouteElementIdentifier, animated: Bool, context: Any?, completion: @escaping RoutingCompletion ) -> Bool
- 
                  change(from:Default implementationto: animated: context: completion: ) When a Navigateaction is dispatched, theNavigatorcan ask this Routable to hide/show itself or another Routable identified byidentifiercalling this method. Returntrueif this Routable is handling the action,falseotherwise.Default ImplementationChange a route element DeclarationSwift func change( from: RouteElementIdentifier, to: RouteElementIdentifier, animated: Bool, context: Any?, completion: @escaping RoutingCompletion )
 View on GitHub
View on GitHub Routable Protocol Reference
        Routable Protocol Reference