in React JS by

How to implement default or NotFound page?

1 Answer

0 votes

<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

  <Route exact path="/" component={Home}/>
  <Route path="/user" component={User}/>
  <Route component={NotFound} />
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