# Function useMemo

- useMemo<T>(factory, deps): T

- `useMemo` will only recompute the memoized value when one of the `deps` has changed.

  #### Type Parameters

  - T

  #### Parameters

  - factory: (() => T)
    - - (): T

      - #### Returns T

  - deps: DependencyList

  #### Returns T

  #### Version

  16.8.0

  #### See

  https://react.dev/reference/react/useMemo

  - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:2063