title: How to reload current page in ReactJS?
body: <p>How to reload current page in ReactJS? in case of javascript we can write <code>window.location.reload();</code>
  How to do the same in Reactjs? I'm able to add new data by UI. But without refreshing, I'm not able to see the list. I want it so that whenever I'm adding some data, it refreshes by itself.</p>
  <pre><code>onAddBucket() {
      let self = this;
      let getToken = localStorage.getItem('myToken');
      var apiBaseUrl = &quot;...&quot;;
      let input = {
        &quot;name&quot; :  this.state.fields[&quot;bucket_name&quot;]
      }
      axios.defaults.headers.common['Authorization'] = getToken;
      axios.post(apiBaseUrl+'...',input)
      .then(function (response) {
  
        if(response.data.status == 200){
        let result =  self.state.buckets.concat(response.data.buckets)
        }else{
          alert(response.data.message);
        }
      })
      .catch(function (error) {
        console.log(error);
      });
    }
  </code></pre>