# Function useInsertionEffect

- useInsertionEffect(effect, deps?): void

- #### 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

  #### See

  https://github.com/facebook/react/pull/21913

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