resolveForwardRef
从 forwardRef 惰性检索引用值。
Lazily retrieves the reference value from a forwardRef.
参见
说明
给定非前向引用值时,充当标识函数。
Acts as the identity function when given a non-forward-ref value.
Further information available in the Usage Notes...
使用说明
例子
Example
const ref = forwardRef(() => 'refValue');
expect(resolveForwardRef(ref as any)).toEqual('refValue');
expect(resolveForwardRef('regularValue')).toEqual('regularValue');