Open doudou673 opened 3 years ago
You can use cy
prop to access the Cytoscape API directly.
For example:
import cytoscape from "cytoscape";
import CytoscapeComponent from "react-cytoscapejs";
import sbgnStylesheet from "cytoscape-sbgn-stylesheet";
export default function App() {
const cyStylesheet = sbgnStylesheet(cytoscape);
return (
<CytoscapeComponent
elements={CytoscapeComponent.normalizeElements(elements)}
cy={(cy) => cy.style(cyStylesheet)}
/>
);
}
I want to use sbgn-stylesheet in my react app, but it doesn't work