Fork of React & D3 Starter
This example demonstrates a reusable starter pattern for integrating React with D3.js, displaying the classic Iris dataset as a scatterplot. The visualization maps sepal length and petal length onto x- and y-axes using D3’s `scaleLinear` and `extent`, with circles rendered via SVG. React manages the component lifecycle through hooks like `useState`, `useEffect`, and `useRef`, while D3 handles selection, data joins, and axis generation with `axisLeft` and `axisBottom`. The code showcases decoupled architecture, scaling for complexity, and copy-paste compatibility with existing projects.