W3cubDocs

/Angular

resolveForwardRef

function

Lazily retrieves the reference value from a forwardRef.

See more...

resolveForwardRef<T>(type: T): T

Parameters
type T
Returns

T

See also

Description

Acts as the identity function when given a non-forward-ref value.

Usage notes

Example

const ref = forwardRef(() => 'refValue');
expect(resolveForwardRef(ref)).toEqual('refValue');
expect(resolveForwardRef('regularValue')).toEqual('regularValue');

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/resolveForwardRef