MCPcopy
hub / github.com/chakra-ui/chakra-ui / forwardRef

Function forwardRef

packages/system/src/forward-ref.tsx:8–20  ·  view source on GitHub ↗
(
  component: React.ForwardRefRenderFunction<
    any,
    RightJoinProps<PropsOf<Component>, Props> & {
      as?: As
    }
  >,
)

Source from the content-addressed store, hash-verified

6import { As, ComponentWithAs, PropsOf, RightJoinProps } from "./system.types"
7
8export function forwardRef<Props extends object, Component extends As>(
9 component: React.ForwardRefRenderFunction<
10 any,
11 RightJoinProps<PropsOf<Component>, Props> & {
12 as?: As
13 }
14 >,
15) {
16 return (React.forwardRef(component) as unknown) as ComponentWithAs<
17 Component,
18 Props
19 >
20}

Callers 15

number-input.tsxFile · 0.90
container.tsxFile · 0.90
code.tsxFile · 0.90
stack.tsxFile · 0.90
grid.tsxFile · 0.90
text.tsxFile · 0.90
flex.tsxFile · 0.90
link-box.tsxFile · 0.90
box.tsxFile · 0.90
link.tsxFile · 0.90
wrap.tsxFile · 0.90
heading.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…