title: get id from url in react.js
body: <p>i just want to make Ajax request to fetch data from API in REACT.JS, but every API need (id), i want to get that id from URL in browser, how can i do that? this is my code:</p>
  
  <pre><code>componentDidMount(){
  fetch("http://localhost:8000/personal/1")
  .then(res =&gt; res.json())
  .then(json =&gt; {
      this.setState({
          isLoaded: true,
          information: json,
      })
  })
  </code></pre>
  
  <p>i make the API by Laravel, and every thing work good with this code above, but as i said, i want to get the id from url in browser not just write it as now, thank you :)
      }</p>