In React Router v5, the exact prop ensures that a route only matches when the path is an exact match.
Significance of exact:
Without exact, a route matches partially, meaning / would match /, /about, /contact, etc.
Effect on Matching:
<Route path="/" component={Home} /> // Matches all paths starting with "/"
<Route path="/about" component={About} />
With exact:
<Route exact path="/" component={Home} /> // Only matches "/"
<Route path="/about" component={About} />