Home / Function/ dispatch() — ui Function Reference

dispatch() — ui Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  23a8ce30_00a5_617f_ac96_6badbe20ecf5["dispatch()"]
  bba373ff_472d_b9de_12be_a7a606cb2977["use-toast.ts"]
  23a8ce30_00a5_617f_ac96_6badbe20ecf5 -->|defined in| bba373ff_472d_b9de_12be_a7a606cb2977
  d66b6217_4be0_312d_7d3d_7269ff9b6feb["addToRemoveQueue()"]
  d66b6217_4be0_312d_7d3d_7269ff9b6feb -->|calls| 23a8ce30_00a5_617f_ac96_6badbe20ecf5
  e082734e_c4d5_f91f_d9e4_b72e8e678602["toast()"]
  e082734e_c4d5_f91f_d9e4_b72e8e678602 -->|calls| 23a8ce30_00a5_617f_ac96_6badbe20ecf5
  433da4aa_9c7c_eb9c_bd33_bb9dbb7c4d28["useToast()"]
  433da4aa_9c7c_eb9c_bd33_bb9dbb7c4d28 -->|calls| 23a8ce30_00a5_617f_ac96_6badbe20ecf5
  02f056a2_d671_2934_e3a8_495b9d22c323["reducer()"]
  23a8ce30_00a5_617f_ac96_6badbe20ecf5 -->|calls| 02f056a2_d671_2934_e3a8_495b9d22c323
  style 23a8ce30_00a5_617f_ac96_6badbe20ecf5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/hooks/use-toast.ts lines 136–141

function dispatch(action: Action) {
  memoryState = reducer(memoryState, action)
  listeners.forEach((listener) => {
    listener(memoryState)
  })
}

Subdomains

Calls

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free