Home / Function/ addToRemoveQueue() — ui Function Reference

addToRemoveQueue() — ui Function Reference

Architecture documentation for the addToRemoveQueue() function in use-toast.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  ac6cc7b8_7ed9_9e4c_685d_fdc48030a64f["addToRemoveQueue()"]
  0ac37ef4_ee03_7234_1fa3_be05404864ce["use-toast.ts"]
  ac6cc7b8_7ed9_9e4c_685d_fdc48030a64f -->|defined in| 0ac37ef4_ee03_7234_1fa3_be05404864ce
  c07b5fcc_69de_7a7c_19e6_3382a66187bb["reducer()"]
  c07b5fcc_69de_7a7c_19e6_3382a66187bb -->|calls| ac6cc7b8_7ed9_9e4c_685d_fdc48030a64f
  4cadcb11_5cb9_1eed_a20f_6444ac24ea81["dispatch()"]
  ac6cc7b8_7ed9_9e4c_685d_fdc48030a64f -->|calls| 4cadcb11_5cb9_1eed_a20f_6444ac24ea81
  style ac6cc7b8_7ed9_9e4c_685d_fdc48030a64f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/default/hooks/use-toast.ts lines 61–75

const addToRemoveQueue = (toastId: string) => {
  if (toastTimeouts.has(toastId)) {
    return
  }

  const timeout = setTimeout(() => {
    toastTimeouts.delete(toastId)
    dispatch({
      type: "REMOVE_TOAST",
      toastId: toastId,
    })
  }, TOAST_REMOVE_DELAY)

  toastTimeouts.set(toastId, timeout)
}

Subdomains

Calls

Called By

Frequently Asked Questions

What does addToRemoveQueue() do?
addToRemoveQueue() is a function in the ui codebase, defined in deprecated/www/registry/default/hooks/use-toast.ts.
Where is addToRemoveQueue() defined?
addToRemoveQueue() is defined in deprecated/www/registry/default/hooks/use-toast.ts at line 61.
What does addToRemoveQueue() call?
addToRemoveQueue() calls 1 function(s): dispatch.
What calls addToRemoveQueue()?
addToRemoveQueue() is called by 1 function(s): reducer.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free