Sub-skill of chartjs: With React (+1).
Scanned 9/9/2026
Install to Claude Code
npx -y skills add vamseeachanta/workspace-hub --skill with-react --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of With React?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-with-react-4a91bacb)More formats (shields.io, HTML) on the badges page.
---
name: chartjs-with-react
description: 'Sub-skill of chartjs: With React (+1).'
version: 1.0.0
category: data-visualization
type: reference
scripts_exempt: true
---
# With React (+1)
## With React
```javascript
import { useEffect, useRef } from 'react';
import Chart from 'chart.js/auto';
function ChartComponent({ data }) {
const chartRef = useRef(null);
const chartInstance = useRef(null);
useEffect(() => {
if (chartInstance.current) {
chartInstance.current.destroy();
}
const ctx = chartRef.current.getContext('2d');
chartInstance.current = new Chart(ctx, {
type: 'line',
data: data,
options: { responsive: true }
});
return () => {
if (chartInstance.current) {
chartInstance.current.destroy();
}
};
}, [data]);
return <canvas ref={chartRef} />;
}
```
## With Vue
```vue
<template>
<canvas ref="chartCanvas"></canvas>
</template>
<script>
import Chart from 'chart.js/auto';
export default {
props: ['chartData'],
mounted() {
this.renderChart();
},
methods: {
renderChart() {
const ctx = this.$refs.chartCanvas.getContext('2d');
new Chart(ctx, {
type: 'bar',
data: this.chartData,
options: { responsive: true }
});
}
}
};
</script>
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!