andreypopp / react-quickstart

[DEPRECATED] React project template with server-side UI rendering and routing
371 stars 47 forks source link

Add NotFound handler #12

Closed jgebhardt closed 10 years ago

jgebhardt commented 10 years ago

Out of the box, the request for /favicon.ico 404s and causes the console output to print an error:

TypeError: Cannot read property 'ref' of undefined
    at cloneWithProps (/Users/jxg/github/react-quickstart/node_modules/react/lib/cloneWithProps.js:41:19)
    at RouteRenderingMixin.renderRouteHandler (/Users/jxg/github/react-quickstart/node_modules/react-router-component/lib/RouteRenderingMixin.js:12:12)
    at boundMethod [as renderRouteHandler] (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactCompositeComponent.js:1434:21)
    at React.createClass.render (/Users/jxg/github/react-quickstart/node_modules/react-router-component/lib/Router.js:32:26)
    at ReactCompositeComponentMixin._renderValidatedComponent (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactCompositeComponent.js:1394:34)
    at null._renderValidatedComponent (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactPerf.js:57:21)
    at ReactCompositeComponentMixin.mountComponent (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactCompositeComponent.js:947:14)
    at null.mountComponent (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactPerf.js:57:21)
    at ReactMultiChild.Mixin.mountChildren (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactMultiChild.js:202:42)
    at ReactDOMComponent.Mixin._createContentMarkup (/Users/jxg/github/react-quickstart/node_modules/react/lib/ReactDOMComponent.js:198:32)

This happens because of this issue: https://github.com/andreypopp/react-router-component/issues/36 I think it's a good idea to add a default NotFound handler.

andreypopp commented 10 years ago

Thanks!