react router 5 default route code example
Example: react js set default route
<Router history={history}>
<div>
<Route path="/">
<Redirect to="/Campaign"></Redirect>
</Route>
<Route path="/Campaign" component={CampaignLayout} />
<Route path="/Error" component={Error500} />
<Route path="/success" component={Success} />
</div>
</Router>