MCPcopy Index your code
hub / github.com/SyntaxUI/syntaxui / useInitialValue

Function useInitialValue

src/components/Navigation.tsx:23–26  ·  view source on GitHub ↗
(value: T, condition = true)

Source from the content-addressed store, hash-verified

21}
22
23function useInitialValue<T>(value: T, condition = true) {
24 let initialValue = useRef(value).current
25 return condition ? initialValue : value
26}
27
28function matchPath(pathname: string, href: string) {
29 if (href === '/components') {

Callers 2

VisibleSectionHighlightFunction · 0.85
NavigationGroupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected