title: How to bind data from getJSON to ReactJS state
body: <p>I've been trying to get data from JSON file and bind it to my page with ReactJS</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head lang="en"&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Demo Fetch&lt;/title&gt;
      &lt;link rel="stylesheet" href="style.css" /&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"&gt;&lt;/script&gt;
      &lt;script src="js/jquery-2.1.4.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="content"&gt;&lt;/div&gt;
      &lt;script type="text/jsx"&gt;
          var DataBlock = React.createClass({
              getInitialState:function(){
                  return {};
              },
              loadData:function() {
                  var a=this;
                  $.getJSON(this.props.url, function (obj) {
                      a.setState({data: obj})
                  });
              },
              render: function() {
                  return (
                          &lt;div className="dataBlock" data={this.state.data}&gt;
                              &lt;h1&gt;Sample data block&lt;/h1&gt;
                                  {this.loadData()}
                                  &lt;h3&gt;{data.runtime}&lt;/h3&gt;
                          &lt;/div&gt;
                  );
              }
          });
          React.render(
                  &lt;DataBlock url="small_data.json"/&gt;,
                  document.getElementById('content')
          );
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But nothing is shown when I try to display the page. What's wrong with my code? Where's the bug in it? Why can't I bind data from <code>getJSON</code> to the state of my React component?</p>
  
  <p>This is my <code>small_data.json</code> file:</p>
  
  <pre><code>{
    "movies": [
      {
        "abridged_cast": [
          {
            "characters": [
              "Dominic Toretto"
            ],
            "id": "162652472",
            "name": "Vin Diesel"
          },
          {
            "characters": [
              "Brian O'Conner"
            ],
            "id": "162654234",
            "name": "Paul Walker"
          }
        ],
        "runtime": 140,
        "synopsis": "Continuing the global exploits in the unstoppable franchise built on speed, Vin Diesel, Paul Walker and Dwayne Johnson lead the returning cast of Fast &amp; Furious 7. James Wan directs this chapter of the hugely successful series that also welcomes back favorites Michelle Rodriguez, Jordana Brewster, Tyrese Gibson, Chris \"Ludacris\" Bridges, Elsa Pataky and Lucas Black. They are joined by international action stars new to the franchise including Jason Statham, Djimon Hounsou, Tony Jaa, Ronda Rousey and Kurt Russell.",
        "title": "Furious 7",
        "year": 2015
      }
    ],
    "runtime": 140
  }
  </code></pre>