# Function memo

- memo<P>(Component, propsAreEqual?): NamedExoticComponent<P>

- Lets you skip re-rendering a component when its props are unchanged.

  #### Type Parameters

  - P extends object

  #### Parameters

  - Component: FunctionComponent<P>

    The component to memoize.

  - `Optional` propsAreEqual: ((prevProps, nextProps) => boolean)

    A function that will be used to determine if the props have changed.

    - - (prevProps, nextProps): boolean

      - #### Parameters

        - prevProps: Readonly<P>
        - nextProps: Readonly<P>

        #### Returns boolean

  #### Returns NamedExoticComponent<P>

  #### See

  React Docs

  #### Example

      import { memo } from 'react';

      const SomeComponent = memo(function SomeComponent(props: { foo: string }) {
        // ...
      });

  - Defined in common/temp/node_modules/.pnpm/@types+react@18.3.3/node_modules/@types/react/index.d.ts:1760
- memo<T>(Component, propsAreEqual?): MemoExoticComponent<T>

- #### Type Parameters

  - T extends ComponentType<any>

  #### Parameters

  - Component: T
  - `Optional` propsAreEqual: ((prevProps, nextProps) => boolean)
    - - (prevProps, nextProps): boolean

      - #### Parameters

        - prevProps: Readonly<ComponentProps<T>>
        - nextProps: Readonly<ComponentProps<T>>

        #### Returns boolean

  #### Returns MemoExoticComponent<T>

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