是否可以将以下D3片段转换为“纯粹的”ReactJS,以避免与D3进行任何与DOM的交互(让React处理它)?
// Dragging an SVG `g` element
d3Select(this.g)
.call(
d3Drag()
.on('start', this.handleDragStarted)
.on('drag', this.handleDragged)
.on('end', this.handleDragEnded)
);
// Zooming
d3Zoom()
.on('start', this.handleZoomStart)
.on('zoom', this.handleZoom)
.on('end', this.handleZoom);