title: Update URL in browser while scrolling a page in React
body: <p>I am trying to create a smooth scrolling page in React. Let's say the page is split into 4 sections:</p>
  <ul>
  <li>Who we are</li>
  <li>About</li>
  <li>Members</li>
  <li>Alumni</li>
  </ul>
  <p>So on scrolling, if it's at the section 'Members' with the id=members the URL should be updated to:
  website.com/who-we-are#members so he can copy this link, and when you access this URL to send you directly to that section.</p>