MCPcopy
hub / github.com/facebook/react / useImperativeHandle

Function useImperativeHandle

packages/react/src/ReactHooks.js:151–158  ·  view source on GitHub ↗
(
  ref: {current: T | null} | ((inst: T | null) => mixed) | null | void,
  create: () => T,
  deps: Array<mixed> | void | null,
)

Source from the content-addressed store, hash-verified

149}
150
151export function useImperativeHandle<T>(
152 ref: {current: T | null} | ((inst: T | null) => mixed) | null | void,
153 create: () => T,
154 deps: Array<mixed> | void | null,
155): void {
156 const dispatcher = resolveDispatcher();
157 return dispatcher.useImperativeHandle(ref, create, deps);
158}
159
160export function useDebugValue<T>(
161 value: T,

Calls 1

resolveDispatcherFunction · 0.70

Tested by

no test coverage detected