resolveForwardRef
function
stable
Lazily retrieves the reference value from a forwardRef.
Description
Lazily retrieves the reference value from a forwardRef.
Acts as the identity function when given a non-forward-ref value.
Usage Notes
Example
const ref = forwardRef(() => 'refValue'); expect(resolveForwardRef(ref as any)).toEqual('refValue'); expect(resolveForwardRef('regularValue')).toEqual('regularValue');
Jump to details