title: CytoscapeJS in React: run the layout
body: <p>I have cytoscape in react using plotly's cytoscape for react, <a href="https://github.com/plotly/react-cytoscapejs" rel="nofollow noreferrer">here</a>. </p>
  
  <p>I have performed the following steps: </p>
  
  <pre><code>// import and register the layouts
  import Cytoscape from 'cytoscape';  
  import COSEBilkent from 'cytoscape-cose-bilkent'; 
  
  Cytoscape.use(COSEBilkent);  
  </code></pre>
  
  <p>And I am rendering my graph inside the component (elements are properly formed):</p>
  
  <pre><code>render() {
  ...
  let elements = ...
  const layout = {name:'cose-bilkent'}; 
  ...
  &lt;Cytoscape
  elements={elements} 
  style={{width:'1635px',height:'1114px'}} 
  layout={layout}
  /&gt;
  </code></pre>
  
  <p>And yet the nodes retain their default positions upon rendering.  I have not yet had much time to work with react.  Is there a simple step that I am missing in order to get this graph to render with a layout?  </p>