how to only load not found when there is no route match in react code example
Example: react router 404 redirect
<Route path='*' exact={true} component={My404Component} />
// Or don't mention path
<Route component={My404Component} />
<Route path='*' exact={true} component={My404Component} />
// Or don't mention path
<Route component={My404Component} />