MCPcopy
hub / github.com/react-dnd/react-dnd / useCollectedProps

Function useCollectedProps

packages/react-dnd/src/hooks/useCollectedProps.ts:5–13  ·  view source on GitHub ↗
(
	collector: ((monitor: Monitor) => Collected) | undefined,
	monitor: Monitor & MonitorEventEmitter,
	connector: Connector,
)

Source from the content-addressed store, hash-verified

3import { useMonitorOutput } from './useMonitorOutput.js'
4
5export function useCollectedProps<Collected, Monitor extends HandlerManager>(
6 collector: ((monitor: Monitor) => Collected) | undefined,
7 monitor: Monitor & MonitorEventEmitter,
8 connector: Connector,
9) {
10 return useMonitorOutput(monitor, collector || (() => ({} as Collected)), () =>
11 connector.reconnect(),
12 )
13}

Callers 2

useDragFunction · 0.85
useDropFunction · 0.85

Calls 2

useMonitorOutputFunction · 0.85
reconnectMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…