packageDocumentation module import * as React from "react" ; internal export function useRefState < T > ( ) { const [ element , setElement ] = React . useState < T > ( ) ; const ref = React . useCallback ( ( instance ) => { setElement ( instance || undefined ) ; } , [ ] ) ; return [ ref , element ] ; }