Export Code
Connected
Mouth.js
import React from 'react';
import { arc } from 'd3';

export const Mouth = ({mouthRadius, mouthWidth}) => {
const mouthArc = arc()
.innerRadius(mouthRadius)
.outerRadius(mouthRadius + mouthWidth)
.startAngle(Math.PI / 2)
.endAngle(Math.PI * 3 / 2);
return <path d={mouthArc()}/>;
};

Smiley Face Part V

Curran Kelleher

Last edited Feb 13, 2020
Created on Feb 13, 2020

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

MIT Licensed