
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@antv/g6-extension-react
Advanced tools
This extension allows you to define G6 node by React component and JSX syntax.
npm install @antv/g6-extension-react
import { ExtensionCategory, register } from '@antv/g6';
import { ReactNode } from '@antv/g6-extension-react';
register(ExtensionCategory.NODE, 'react', ReactNode);
React Node:
const ReactNode = () => {
return <div>node</div>;
};
G Node:
import { Group, Rect, Text } from '@antv/g6-extension-react';
const GNode = () => {
return <Group>
<Rect width={100} height={100}></Rect>
<Text text={"node"} />
<Group>
};
Use ReactNode:
const graph = new Graph({
// ... other options
node: {
type: 'react',
style: {
component: () => <ReactNode />,
},
},
});
Use GNode:
const graph = new Graph({
// ... other options
node: {
type: 'g',
style: {
component: () => <GNode />,
},
},
});
ReactNode is a React component, while GNode support jsx syntax but can only use G tag node.
FAQs
Using React Component to Define Your G6 Graph Node
The npm package @antv/g6-extension-react receives a total of 90,044 weekly downloads. As such, @antv/g6-extension-react popularity was classified as popular.
We found that @antv/g6-extension-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 72 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.