MCPcopy
hub / github.com/untitleduico/react / isForwardRefComponent

Function isForwardRefComponent

utils/is-react-component.ts:24–26  ·  view source on GitHub ↗
(component: any)

Source from the content-addressed store, hash-verified

22 * Checks if a given value is a forward ref component.
23 */
24export const isForwardRefComponent = (component: any): component is React.ForwardRefExoticComponent<any> => {
25 return typeof component === "object" && component !== null && component.$$typeof.toString() === "Symbol(react.forward_ref)";
26};
27
28/**
29 * Checks if a given value is a valid React component.

Callers 1

isReactComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected