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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy