title: react router on how to collapse the navbar on mobile when selecting the menu links
body: <p>Any idea on how to collapse the navbar on mobile when selecting the menu link pages.</p>
  <p>here is the codesandbox link, feel free to fork it.</p>
  <p><strong><a href="https://codesandbox.io/s/it6lj" rel="nofollow noreferrer">https://codesandbox.io/s/it6lj</a></strong></p>
  <p><a href="https://i.stack.imgur.com/fEykE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fEykE.jpg" alt="enter image description here" /></a></p>
  <p>Thanks!</p>