Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/shadcn-ui/ui
/ useLatest
Function
useLatest
packages/react/src/message-scroller/utils.ts:3–9 ·
view source on GitHub ↗
(value: T)
Source
from the content-addressed store, hash-verified
1
import
* as React from
"react"
2
3
function
useLatest<T>(value: T) {
4
const
ref = React.useRef(value)
5
6
ref.current = value
7
8
return
ref
9
}
10
11
export
{ useLatest }
Callers
1
MessageScrollerButton
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected