[]previous and next page

DeferredEffectOptions

Options of useEffect in its explicit-dependency form useEffect(deps, fn, options).

Options of useEffect in its explicit-dependency form useEffect(deps, fn, options).

Import#

ts
import type { DeferredEffectOptions } from "@shadow-js/core";

Signature#

ts
interface DeferredEffectOptions extends EffectOptions {
  /**
   * Skip the first call of `fn`: `deps` is still read (and tracked) on the first run, but `fn` only
   * runs for later changes of it.
   * @default false
   */
  defer?: boolean;
}

Members#

Name Type Description
defer? defer?: boolean Skip the first call of fn: deps is still read (and tracked) on the first run, but fn only runs for later changes of it.