useStableMemo
API
import useStableMemo from '@restart/hooks/useStableMemo'useStableMemo<T>(factory: () => T, deps?: DependencyList) => TIdentical to
useMemoexcept that it provides a semantic guarantee that values will not be invalidated unless the dependencies change. This is unlike the built inuseMemowhich may discard memoized values for performance reasons.Parameters
factory() => TA function that returns a value to be memoized
deps?DependencyListA dependency array
Return Value T