MCPcopy
hub / github.com/reactchartjs/react-chartjs-2 / reforwardRef

Function reforwardRef

src/utils.ts:15–21  ·  view source on GitHub ↗
(ref: ForwardedRef<T>, value: T)

Source from the content-addressed store, hash-verified

13const defaultDatasetIdKey = 'label';
14
15export function reforwardRef<T>(ref: ForwardedRef<T>, value: T) {
16 if (typeof ref === 'function') {
17 ref(value);
18 } else if (ref) {
19 ref.current = value;
20 }
21}
22
23export function setOptions<
24 TType extends ChartType = ChartType,

Callers 2

renderChartFunction · 0.85
destroyChartFunction · 0.85

Calls 1

refFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…