title: What's the best way to periodically reload an iframe with React?
body: <p>I'm building a webpage using React which means I can't manipulate the DOM directly. I've tried reloading my iframe by updating the url state but that doesn't seem to reload the page. This is the state code I have tried. </p>
  
  <pre><code>componentDidMount: function() {
      setInterval(function(){
          this.setState({currentUrl:currentUrl});
      }.bind(this), 1000);
  },
   getInitialState: function() {
      return {defaultUrl:this.props.graph.url, currentUrl:this.props.graph.url};
  },
  render() {
      // render the graph iframe
      return (
          &lt;iframe src={this.state.currentUrl} id={this.props.graph.url} style={this.props.style} width={this.props.width} height={this.props.graph_height} /&gt;
      )
  }
  </code></pre>