Home / File/ app.tsx — vite Source File

app.tsx — vite Source File

Architecture documentation for app.tsx, a tsx file in the vite codebase. 5 imports, 1 dependents.

File tsx ProjectScaffolder TemplateEngine 5 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  058487b0_6a23_2d05_df1e_a31fc3934d27["app.tsx"]
  a9d96cc6_eb5b_0ea3_8b3a_7b4fdf1178ff["./assets/preact.svg"]
  058487b0_6a23_2d05_df1e_a31fc3934d27 --> a9d96cc6_eb5b_0ea3_8b3a_7b4fdf1178ff
  97ae53c7_c3f0_e77e_d5fd_1e5c98021238["./assets/vite.svg"]
  058487b0_6a23_2d05_df1e_a31fc3934d27 --> 97ae53c7_c3f0_e77e_d5fd_1e5c98021238
  87bfbe72_b5b9_a17d_b7df_46cc5336e18c["./assets/hero.png"]
  058487b0_6a23_2d05_df1e_a31fc3934d27 --> 87bfbe72_b5b9_a17d_b7df_46cc5336e18c
  4b940811_1f67_9d27_6046_228f8b97006b["app.css"]
  058487b0_6a23_2d05_df1e_a31fc3934d27 --> 4b940811_1f67_9d27_6046_228f8b97006b
  818cee82_6b58_61c6_f04e_1736281329e7["hooks"]
  058487b0_6a23_2d05_df1e_a31fc3934d27 --> 818cee82_6b58_61c6_f04e_1736281329e7
  37073f07_f6c5_e84d_4965_f0e15127ac54["main.tsx"]
  37073f07_f6c5_e84d_4965_f0e15127ac54 --> 058487b0_6a23_2d05_df1e_a31fc3934d27
  style 058487b0_6a23_2d05_df1e_a31fc3934d27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { useState } from 'preact/hooks'
import preactLogo from './assets/preact.svg'
import viteLogo from './assets/vite.svg'
import heroImg from './assets/hero.png'
import './app.css'

export function App() {
  const [count, setCount] = useState(0)

  return (
    <>
      <section id="center">
        <div class="hero">
          <img src={heroImg} class="base" width="170" height="179" alt="" />
          <img src={preactLogo} class="framework" alt="Preact logo" />
          <img src={viteLogo} class="vite" alt="Vite logo" />
        </div>
        <div>
          <h1>Get started</h1>
          <p>
            Edit <code>src/app.tsx</code> and save to test <code>HMR</code>
          </p>
        </div>
        <button class="counter" onClick={() => setCount((count) => count + 1)}>
          Count is {count}
        </button>
      </section>

      <div class="ticks"></div>

      <section id="next-steps">
        <div id="docs">
          <svg class="icon" role="presentation" aria-hidden="true">
            <use href="/icons.svg#documentation-icon"></use>
          </svg>
          <h2>Documentation</h2>
          <p>Your questions, answered</p>
          <ul>
            <li>
              <a href="https://vite.dev/" target="_blank">
                <img class="logo" src={viteLogo} alt="" />
                Explore Vite
              </a>
            </li>
            <li>
              <a href="https://preactjs.com/" target="_blank">
                <img class="button-icon" src={preactLogo} alt="" />
                Learn more
              </a>
            </li>
          </ul>
        </div>
        <div id="social">
          <svg class="icon" role="presentation" aria-hidden="true">
            <use href="/icons.svg#social-icon"></use>
          </svg>
          <h2>Connect with us</h2>
          <p>Join the Vite community</p>
          <ul>
            <li>
              <a href="https://github.com/vitejs/vite" target="_blank">
                <svg class="button-icon" role="presentation" aria-hidden="true">
                  <use href="/icons.svg#github-icon"></use>
                </svg>
                GitHub
              </a>
            </li>
            <li>
              <a href="https://chat.vite.dev/" target="_blank">
                <svg class="button-icon" role="presentation" aria-hidden="true">
                  <use href="/icons.svg#discord-icon"></use>
                </svg>
                Discord
              </a>
            </li>
            <li>
              <a href="https://x.com/vite_js" target="_blank">
                <svg class="button-icon" role="presentation" aria-hidden="true">
                  <use href="/icons.svg#x-icon"></use>
                </svg>
                X.com
              </a>
            </li>
            <li>
              <a href="https://bsky.app/profile/vite.dev" target="_blank">
                <svg class="button-icon" role="presentation" aria-hidden="true">
                  <use href="/icons.svg#bluesky-icon"></use>
                </svg>
                Bluesky
              </a>
            </li>
          </ul>
        </div>
      </section>

      <div class="ticks"></div>
      <section id="spacer"></section>
    </>
  )
}

Subdomains

Functions

Dependencies

  • ./assets/hero.png
  • ./assets/preact.svg
  • ./assets/vite.svg
  • app.css
  • hooks

Frequently Asked Questions

What does app.tsx do?
app.tsx is a source file in the vite codebase, written in tsx. It belongs to the ProjectScaffolder domain, TemplateEngine subdomain.
What functions are defined in app.tsx?
app.tsx defines 1 function(s): App.
What does app.tsx depend on?
app.tsx imports 5 module(s): ./assets/hero.png, ./assets/preact.svg, ./assets/vite.svg, app.css, hooks.
What files import app.tsx?
app.tsx is imported by 1 file(s): main.tsx.
Where is app.tsx in the architecture?
app.tsx is located at packages/create-vite/template-preact-ts/src/app.tsx (domain: ProjectScaffolder, subdomain: TemplateEngine, directory: packages/create-vite/template-preact-ts/src).

Analyze Your Own Codebase

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

Try Supermodel Free