score:0

First wrap your routes inside Switch component in order to force it to render the first match. then, try using Redirect component if you want to render a specific component for other routers. Pls read this part of the documentation for Switch and Redirect

    <Switch>
        <Route path="/" exact={true} component={Home} />
        <Route path="/recipes" component={Recipes} />
        <Route path="/about" component={About} />
        <Redirect to="/" />
    </Switch>

Related Query

More Query from same tag