Home / Function/ greet() — react Function Reference

greet() — react Function Reference

Architecture documentation for the greet() function in actions.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d7c2f724_84c7_db42_3598_2871f0f02c98["greet()"]
  41135158_bb00_046d_9f07_fa840a610429["actions.js"]
  d7c2f724_84c7_db42_3598_2871f0f02c98 -->|defined in| 41135158_bb00_046d_9f07_fa840a610429
  11ebd183_e520_1c29_547a_68372f377ed0["setServerState()"]
  d7c2f724_84c7_db42_3598_2871f0f02c98 -->|calls| 11ebd183_e520_1c29_547a_68372f377ed0
  style d7c2f724_84c7_db42_3598_2871f0f02c98 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight/src/actions.js lines 16–26

export async function greet(formData) {
  const name = formData.get('name') || 'you';
  setServerState('Hi ' + name);
  const file = formData.get('file');
  if (file) {
    return `Ok, ${name}, here is ${file.name}:
      ${(await file.text()).toUpperCase()}
    `;
  }
  return 'Hi ' + name + '!';
}

Domain

Subdomains

Frequently Asked Questions

What does greet() do?
greet() is a function in the react codebase, defined in fixtures/flight/src/actions.js.
Where is greet() defined?
greet() is defined in fixtures/flight/src/actions.js at line 16.
What does greet() call?
greet() calls 1 function(s): setServerState.

Analyze Your Own Codebase

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

Try Supermodel Free