Skip to main content
100%

Smiley

✓ Published0🌍 Public
SSayantan Pal
Last edited Apr 29, 2021
Created on Apr 29, 2021
Forked from Smiley Face Part V

This example shows a static smiley face rendered as an SVG, composed of a yellow circular background, two eyes, and a curved mouth. The React components are split into separate ES6 modules—BackgroundCircle, Eyes, and Mouth—and assembled within an SVG group translated to the center of a 960×500 canvas. The mouth uses the d3.arc generator from d3.v5 to create a path with specified inner and outer radii and angular range. React Fragments group the eyes without adding extra DOM nodes.

AI-generated description

Splitting React components into multiple files using ES6 modules. Bonus: React Fragments!

MIT Licensed

Similar vizzes