title: Clustering pins with Cesium used in ReactJS
body: <p>How can I integrate Cesium <a href="https://cesiumjs.org/Cesium/Build/Documentation/EntityCluster.html" rel="nofollow noreferrer">EntityCluster</a> with my React component and have the clustering updates render?</p>
  
  <p>My project is structured to have React components rendering Cesium content like in <a href="https://blog.isquaredsoftware.com/2017/03/declarative-earth-part-2-cesium-react/" rel="nofollow noreferrer">this example</a>. My data source for pin locations is currently contained as an array of coordinates and text information in a Redux state. I am trying to use the <a href="https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Clustering.html" rel="nofollow noreferrer">code example</a> from the Cesium Sandbox with my data in a separate React component by changing the dataSourcePromise to:</p>
  
  <pre><code>//pinArray is a Redux state    
  var datasource = new Cesium.CustomDataSource(pinArray)
  </code></pre>
  
  <p>There are no errors in the console and the CustomDataSource console logs my data as an array in _name. The pin clustering is not working and/or not being updated in the React rendering.</p>