Options
All
  • Public
  • Public/Protected
  • All
Menu

Module vx-hooks/useSetRef

仿 react ref

Index

Interfaces

Functions

Functions

useSetRef

  • 仿 react ref

    example
    
    const { state, setState } = useSetRef(0)
    setState(10)
    
    console.log(state.value)
    => 10
    
    

    Type parameters

    • T

      值类型

    Parameters

    • initVal: T

      T 初始值

    Returns UseSetRefAPI<T>

Generated using TypeDoc