Skip to main content
100%

Fork of HTML Starter

✓ Published0🌍 Public
Aankolaver
Last edited Mar 8, 2021
Created on Mar 8, 2021
Forked from HTML Starter

This example demonstrates a simple React application that renders an SVG line using JSX, with a red stroke and no fill. The code imports React hooks and D3, then uses D3 selections to manipulate the SVG path’s stroke color, first changing it to blue and then to green via a class selector. It also queries the path to log its total length and a point at a specific distance using the `getTotalLength()` and `getPointAtLength()` methods. React renders the component into the DOM, while D3 v5 handles the DOM queries and attribute updates.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes