MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / useInitialValue

Function useInitialValue

apps/baseai.dev/src/components/Navigation.tsx:14–17  ·  view source on GitHub ↗
(value: T, condition = true)

Source from the content-addressed store, hash-verified

12import { useEffect, useRef } from 'react';
13
14function useInitialValue<T>(value: T, condition = true) {
15 let initialValue = useRef(value).current;
16 return condition ? initialValue : value;
17}
18
19// function TopLevelNavItem({
20// href,

Callers 1

NavigationGroupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected