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
  82a45ccc_bcac_3e6c_85bc_df2435d5cede["greet()"]
  6b95c06f_215b_1e97_d47c_b54ecfe66630["actions.js"]
  82a45ccc_bcac_3e6c_85bc_df2435d5cede -->|defined in| 6b95c06f_215b_1e97_d47c_b54ecfe66630
  36295412_a7f7_feaa_b721_6695e0d1be8b["setServerState()"]
  82a45ccc_bcac_3e6c_85bc_df2435d5cede -->|calls| 36295412_a7f7_feaa_b721_6695e0d1be8b
  style 82a45ccc_bcac_3e6c_85bc_df2435d5cede fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight-esm/src/actions.js lines 10–20

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-esm/src/actions.js.
Where is greet() defined?
greet() is defined in fixtures/flight-esm/src/actions.js at line 10.
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