Home / Function/ formatPriority() — react Function Reference

formatPriority() — react Function Reference

Architecture documentation for the formatPriority() function in Fibers.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a359d057_8c99_f8b1_2c70_c350a2906833["formatPriority()"]
  a811b6d7_3802_33c4_440e_c2d161277e14["Fibers.js"]
  a359d057_8c99_f8b1_2c70_c350a2906833 -->|defined in| a811b6d7_3802_33c4_440e_c2d161277e14
  1287fd16_2b9c_ebc8_7d61_7642cb86b380["Fibers()"]
  1287fd16_2b9c_ebc8_7d61_7642cb86b380 -->|calls| a359d057_8c99_f8b1_2c70_c350a2906833
  style a359d057_8c99_f8b1_2c70_c350a2906833 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/fiber-debugger/src/Fibers.js lines 240–255

function formatPriority(priority) {
  switch (priority) {
    case 1:
      return 'synchronous';
    case 2:
      return 'task';
    case 3:
      return 'hi-pri work';
    case 4:
      return 'lo-pri work';
    case 5:
      return 'offscreen work';
    default:
      throw new Error('Unknown priority.');
  }
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does formatPriority() do?
formatPriority() is a function in the react codebase, defined in fixtures/fiber-debugger/src/Fibers.js.
Where is formatPriority() defined?
formatPriority() is defined in fixtures/fiber-debugger/src/Fibers.js at line 240.
What calls formatPriority()?
formatPriority() is called by 1 function(s): Fibers.

Analyze Your Own Codebase

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

Try Supermodel Free