react router page not found code example

Example 1: react router 404 redirect

<Route path='*' exact={true} component={My404Component} />
 // Or don't mention path
<Route component={My404Component} />

Example 2: route with parameter react not working not found

<div>
    <Router history={browserHistory}>
        <Route path="/" component={NewCustomerContainer} />
        <Route path="/newCustomer" component={NewCustomerContainer} />
        <Route path="/search" component={SearchPageContainer} />
        <Route path="/network" component={NetworkMetaContainer}>
            <Route path="/:id" component={NetworkContainer}/>
        </Route>
    </Router>
</div>