# Function useEffect

- useEffect(effect, deps?): void

- Accepts a function that contains imperative, possibly effectful code.

  #### Parameters

  - effect: EffectCallback

    Imperative function that can return a cleanup function

  - `Optional` deps: DependencyList

    If present, effect will only activate if the values in the list change.

  #### Returns void

  #### Version

  16.8.0

  #### See

  https://react.dev/reference/react/useEffect

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