                                      willShow viewController: UIViewController, animated: Bool) {
         if pushingViewController {
             pushingViewController = false
-            onControllerDidShow = { }
+            onControllerDidShow = .none
         } else if !pushingViewController && topViewController != .none {
             // If a controller is not being pushed and the top view controller
             // is not nil then the navigation controller is poping the top view controller.

            } else if let message = currentNavigationBarOnBack {
                onControllerDidShow = { self.mailbox.dispatch(message: message) }
            } else {
                onControllerDidShow = { }
            }
        }
    }
    
    public func navigationController(_ navigationController: UINavigationController,
                                     didShow viewController: UIViewController, animated: Bool) {
        onControllerDidShow()
        onControllerDidShow = { }
        onPop = { }
    }
    
}

    private let statusBarStyle: UIStatusBarStyle
    private var pushingViewController = false
    private var currentNavigationBarOnBack: MessageType? = .none
    private var onControllerDidShow: (() -> Void)? = .none
    private var onPop: (() -> Void)? = .none
    
    init(customComponentRenderer: CustomComponentRendererType, layoutEngine: LayoutEngine, statusBarStyle: UIStatusBarStyle = .`default`) {
