填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

resolveForwardRef

从 forwardRef 惰性检索引用值。

Lazily retrieves the reference value from a forwardRef.

查看"说明"...

      
      resolveForwardRef<T>(type: T): T
    
参数
type T
返回值

T

参见

说明

给定非前向引用值时,充当标识函数。

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');