         render: ->
             (Dom.div null,
                 (Navbar brandName: "Peer Chat", navbarItems: @props.navbarItems),
+                (@state.alert)
                 (@state.currentComponent))
 
+        addAlert: (alert) ->
+            @setState alert: alert
+
     mountNode = document.getElementById("react")
-    React.renderComponent Root(routes: routes, navbarItems: navbarItems, defaultRoute: "/connect"), mountNode
+    React.renderComponent Root(routes: routes, defaultRoute: "/connect", navbarItems: navbarItems), mountNode


peer.on "error", (error) ->
    alert error.message

Input = React.createClass
    displayName: "Input"


        getInitialState: ->
            currentComponent: Connect()
            alert: Noop()

        componentDidMount: ->
            _.forEach @props.routes, (route) =>
