# Function useRecoilCallback

- useRecoilCallback<Args, Return>(fn, deps?): ((...args) => Return)

- Returns a function that will run the callback that was passed when calling this hook. Useful for accessing Recoil state in response to events.

  #### Type Parameters

  - Args extends readonly unknown[]
  - Return

  #### Parameters

  - fn: ((interface) => ((...args) => Return))
    - - (interface): ((...args) => Return)

      - #### Parameters

        - interface: CallbackInterface

        #### Returns ((...args) => Return)

        - - (...args): Return

          - #### Parameters

            - `Rest` ...args: Args

            #### Returns Return

  - `Optional` deps: readonly unknown[]

  #### Returns ((...args) => Return)

  - - (...args): Return

    - #### Parameters

      - `Rest` ...args: Args

      #### Returns Return

  - Defined in common/temp/node_modules/.pnpm/recoil@0.7.7_react-dom@18.3.1+react@18.3.1/node_modules/recoil/index.d.ts:283