Skip to content

Commit 92c454b

Browse files
committed
refactor: remove useImperativeHandle
1 parent f976f8d commit 92c454b

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/CChart.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import React, {
44
HTMLAttributes,
55
MutableRefObject,
66
useEffect,
7-
useImperativeHandle,
87
useMemo,
98
useRef,
109
} from 'react'
@@ -155,10 +154,6 @@ export const CChart = forwardRef<ChartJS | undefined, CChartProps>(
155154
| undefined
156155
>()
157156

158-
useImperativeHandle<ChartJS | undefined, ChartJS | undefined>(ref, () => chartRef.current, [
159-
chartRef,
160-
])
161-
162157
const computedData = useMemo(() => {
163158
if (typeof data === 'function') {
164159
return canvasRef.current ? data(canvasRef.current) : { datasets: [] }

0 commit comments

Comments
 (0)