plotly / react-cytoscapejs

React component for Cytoscape.js network visualisations
MIT License
483 stars 68 forks source link

fix window is not defined for SSR #89

Closed PierreCrb closed 2 years ago

PierreCrb commented 2 years ago

const isClient = typeof window !== 'undefined'

let CytoscapeComponent
if (typeof window !== 'undefined') {
  CytoscapeComponent = require('react-cytoscapejs')
}