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
  d66b6217_4be0_312d_7d3d_7269ff9b6feb["addToRemoveQueue()"]
  bba373ff_472d_b9de_12be_a7a606cb2977["use-toast.ts"]
  d66b6217_4be0_312d_7d3d_7269ff9b6feb -->|defined in| bba373ff_472d_b9de_12be_a7a606cb2977
  02f056a2_d671_2934_e3a8_495b9d22c323["reducer()"]
  02f056a2_d671_2934_e3a8_495b9d22c323 -->|calls| d66b6217_4be0_312d_7d3d_7269ff9b6feb
  23a8ce30_00a5_617f_ac96_6badbe20ecf5["dispatch()"]
  d66b6217_4be0_312d_7d3d_7269ff9b6feb -->|calls| 23a8ce30_00a5_617f_ac96_6badbe20ecf5
  style d66b6217_4be0_312d_7d3d_7269ff9b6feb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/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/new-york/hooks/use-toast.ts.
Where is addToRemoveQueue() defined?
addToRemoveQueue() is defined in deprecated/www/registry/new-york/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