in React JS by
Q:

How to implement default or NotFound page?

1 Answer

0 votes
by

<Switch> renders the first child <Route> that matches. A <Route> with no path always matches. So you just need to simply drop path attribute as below

<Switch>
  <Route exact path="/" component={Home}/>
  <Route path="/user" component={User}/>
  <Route component={NotFound} />
</Switch>
Click here to read more about React JS
Click here to read more about Insurance

Related questions

+1 vote
asked Mar 2, 2020 in React JS by RShastri
0 votes
asked Dec 9, 2020 in Agile by SakshiSharma
0 votes
asked Jun 5, 2020 in PouchDB by AdilsonLima
0 votes
asked Dec 3, 2019 in SOAPUI by Sinaya
0 votes
asked Nov 26, 2019 in React JS by AdilsonLima
...