Home / File/ root.tsx — vite Source File

root.tsx — vite Source File

Architecture documentation for root.tsx, a tsx file in the vite codebase. 1 imports, 2 dependents.

File tsx ViteCore ConfigEngine 1 imports 2 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  f3ac8f71_df40_6a45_d1ab_51a2042d3e19["root.tsx"]
  16c08f9f_8e90_777b_a0bf_1b3f40a90ecd["react"]
  f3ac8f71_df40_6a45_d1ab_51a2042d3e19 --> 16c08f9f_8e90_777b_a0bf_1b3f40a90ecd
  924c3ceb_c8a7_c86d_4746_0b7fa89de625["entry-client.tsx"]
  924c3ceb_c8a7_c86d_4746_0b7fa89de625 --> f3ac8f71_df40_6a45_d1ab_51a2042d3e19
  8cf622ac_b52d_c87c_da85_18734f590a24["entry-server.tsx"]
  8cf622ac_b52d_c87c_da85_18734f590a24 --> f3ac8f71_df40_6a45_d1ab_51a2042d3e19
  style f3ac8f71_df40_6a45_d1ab_51a2042d3e19 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import React from 'react'

export default function Root() {
  const [count, setCount] = React.useState(0)

  const [hydrated, setHydrated] = React.useState(false)
  React.useEffect(() => {
    setHydrated(true)
  }, [])

  return (
    <div>
      <div>hydrated: {String(hydrated)}</div>
      <div>Count: {count}</div>
      <button onClick={() => setCount((v) => v - 1)}>-1</button>
      <button onClick={() => setCount((v) => v + 1)}>+1</button>
    </div>
  )
}

Domain

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does root.tsx do?
root.tsx is a source file in the vite codebase, written in tsx. It belongs to the ViteCore domain, ConfigEngine subdomain.
What functions are defined in root.tsx?
root.tsx defines 1 function(s): Root.
What does root.tsx depend on?
root.tsx imports 1 module(s): react.
What files import root.tsx?
root.tsx is imported by 2 file(s): entry-client.tsx, entry-server.tsx.
Where is root.tsx in the architecture?
root.tsx is located at playground/environment-react-ssr/src/root.tsx (domain: ViteCore, subdomain: ConfigEngine, directory: playground/environment-react-ssr/src).

Analyze Your Own Codebase

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

Try Supermodel Free