Embed a Graphistry visualization via React
npm install @graphistry/client-api-reactnpm install @graphistry/client-api-react
``javascript
import React from 'react';
import ReactDOM from 'react-dom';
import { Graphistry } from '@graphistry/client-api-react';
//... Specify bundle format when default is incompatible: @graphistry/client-api-react/dist/index.{esm,cjs,iife}.js
import '@graphistry/client-api-react/assets/index.less';
ReactDOM.render(
document.getElementById('react-root')
);
`$3
* API: Interactive storybook
* Project structure: Create React App sample project
* @graphistry/client-api-react wraps @graphistry/client-api, so use aligned versionsReact
* By default, is linked as an external dependency (16.8+, 17.x, 18.x)@graphistry/client-api-react
* You can use multiple module formats: (default) or pick a specific format via @graphistry/client-api-react/dist/index.{esm,cjs,iife}.js@graphistry/client-api-react/dist/index.full.{esm,cjs,iife}.js`
* You can also use the library standalone, where React is already inlined: