Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

React & D3 Starter

Public visualization

Viewing a saved revision (read-only)

98ce0b22cd494b91b9f7dfc92c104df1

React & D3 Starter

0 stars262🌍 Public
CCurran Kelleher
Last edited Mar 13, 2026
Created on Oct 10, 2025
Forked from React Starter

This example demonstrates a minimal pattern for combining React and D3.js, where React manages the component lifecycle and D3 performs direct DOM manipulation. The App component renders a single div element, and after the initial mount, the `useEffect` hook triggers a D3 selection. The `select()` function from D3 targets the DOM node referenced by React’s `useRef` hook, and the `.text()` method sets the div’s content to "Hello D3 & React." This shows how D3’s imperative API can be applied to a React-managed element.

AI-generated description