Skip to content

Instantly share code, notes, and snippets.

Last active October 6, 2022 15:34
What would you like to do?
Create A Line Chart Component
import React, { useRef, useState } from 'react';
import PropTypes from 'prop-types';
const LineChart = ({ data }) => {
return null;
LineChart.propTypes = {
/** The shape of the data */
data: PropTypes.arrayOf(
total: PropTypes.number.isRequired,
date: PropTypes.string.isRequired
export default LineChart;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment