Skip to content

Instantly share code, notes, and snippets.

View iammdmusa's full-sized avatar

Md Musa iammdmusa

View GitHub Profile
@iammdmusa
iammdmusa / data.js
Last active September 17, 2019 11:54
Class List extends Component {
state = {
data : []
}
// use this on your API response section only
this.setState({
data : response.data // this will be you receiving data in array path
})
import React from "react";
import ReactDOM from "react-dom";
import { Pie } from 'react-chartjs-2'
import useWindowSize from "./get-window-side-hot-refresh";
function PieChart() {
const size = useWindowSize();
return (
<React.Fragment>