Home / Function/ App() — react Function Reference

App() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f3d1017b_ed30_acb7_17da_6b4e8a9d41ef["App()"]
  eef5c2d6_5cd1_257d_9f3d_8561e1cce25f["App.js"]
  f3d1017b_ed30_acb7_17da_6b4e8a9d41ef -->|defined in| eef5c2d6_5cd1_257d_9f3d_8561e1cce25f
  2766123c_1c21_1780_8b08_9d9d9ff74b1b["getServerState()"]
  f3d1017b_ed30_acb7_17da_6b4e8a9d41ef -->|calls| 2766123c_1c21_1780_8b08_9d9d9ff74b1b
  style f3d1017b_ed30_acb7_17da_6b4e8a9d41ef fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight-esm/src/App.js lines 12–74

export default async function App() {
  const res = await fetch('http://localhost:3001/todos');
  const todos = await res.json();
  return h(
    'html',
    {
      lang: 'en',
    },
    h(
      'head',
      null,
      h('meta', {
        charSet: 'utf-8',
      }),
      h('meta', {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
      }),
      h('title', null, 'Flight'),
      h('link', {
        rel: 'stylesheet',
        href: '/src/style.css',
        precedence: 'default',
      })
    ),
    h(
      'body',
      null,
      h(
        'div',
        null,
        h('h1', null, getServerState()),
        h(
          'ul',
          null,
          todos.map(todo =>
            h(
              'li',
              {
                key: todo.id,
              },
              todo.text
            )
          )
        ),
        h(Form, {
          action: greet,
        }),
        h(
          'div',
          null,
          h(
            Button,
            {
              action: like,
            },
            'Like'
          )
        )
      )
    )
  );
}

Domain

Subdomains

Frequently Asked Questions

What does App() do?
App() is a function in the react codebase, defined in fixtures/flight-esm/src/App.js.
Where is App() defined?
App() is defined in fixtures/flight-esm/src/App.js at line 12.
What does App() call?
App() calls 1 function(s): getServerState.

Analyze Your Own Codebase

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

Try Supermodel Free