Skip to main content
100%

Fork of Smiley Face Part V

✓ Published0🌍 Public
AAbin
Last edited Apr 19, 2021
Created on Apr 19, 2021
Forked from Smiley Face Part V

This example shows a smiley face built from modular React components, with a yellow circular face, two black radial-gradient eyes, and a curved mouth arc. It demonstrates splitting D3-based SVG rendering into separate ES6 module files, using React fragments in the eyes component and a shared face container for positioning. The code uses React 16.9, D3 v5’s `arc()` API for the mouth path, and renders everything into an SVG via `ReactDOM.render`. All geometry values are defined as constants in the main `index.js` file.

AI-generated description

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

MIT Licensed

Similar vizzes