Skip to content

Make helpers.notFound into a react component #68

@jeneve

Description

@jeneve

lib/index.js

let routes = (
<Router history={browserHistory}>
<Route path="/" component={JobIndex}/>
<Route path="/jobs/:jobId" component={JobShow}/>
<Route path="*" component={helpers.notFound}/>*****ERRORS!
</Router>

we are declaring that if someone puts in anything not handled by explicit route declaration, send the component helpers.notFound, but that’s not a component, it’s just a regular function. So this throws errors and nothing is rendered. We should make a component that is a 404 not found screen, and render that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions