title: React.js and Mapbox: mapbox map not rendering properly when using react.js
body: <p>I'm learning to use both react and mapbox,but am struggling with why my mapbox map is not rendering properly when loaded through React.  When I load it normally (without React.js), there is no problem, as this following code works and the map appears normally:</p>
  
  <pre><code>&lt;script src="https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css"/&gt;
  
  &lt;div&gt; id="map"&gt;&lt;/div&gt;
  
      &lt;script&gt;                
      var map = L.mapbox.map('map', 'blabla.blabla').setView([lat, long], 9);
      &lt;/script&gt;
  </code></pre>
  
  <p>But when I do it the following way, the map often doesn't appear at all, or when it does, I see just a portion of it in the top left of the div.</p>
  
  <pre><code>&lt;script src="path/to/react.js"&gt;&lt;/script&gt;
  &lt;script src="https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css"/&gt;
  
  &lt;div id="react-content"&gt;
      &lt;script src="path/to/react/content.js'&gt;&lt;/script&gt;
  &lt;/div&gt;
  
  //now inside react/content.js, there is a mapbox component inside an outer component. I'm leaving out the rest of the code to save space, and I believe that I am rendering the OuterComponent and the MapBoxMap component correctly inside that.
  
  var MapBoxMap = React.createClass({
      componentDidMount: function() {
          L.mapbox.accessToken = this.props.accessToken;
          var map = L.mapbox.map(this.getDOMNode(), this.props.mapId)
              .setView([15, -105], 9);            
      },
      render: function() {
          return (
                  &lt;div id="map"&gt;&lt;/div&gt;
          );
      }
  });
  </code></pre>
  
  <p>Doing things like zooming, or opening the chrome developer tools seems to make the map appear sometimes.  I don't know what is going on.  Is the component not mounted properly when I attempt to render the map?  I thought that is what componentDidMount was supposed to take care of?  I would really appreciate any insight!  Alos, this map is being rendered inside some Zurb Foundation elements, so I don't know if that makes a difference?</p>