Home / Function/ navigate() — react Function Reference

navigate() — react Function Reference

Architecture documentation for the navigate() function in client.tsx from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  1f4261c6_759e_7549_6b2c_c23373904f85["navigate()"]
  92a57e25_d5ae_6cfd_c67c_ec168f4dede5["client.tsx"]
  1f4261c6_759e_7549_6b2c_c23373904f85 -->|defined in| 92a57e25_d5ae_6cfd_c67c_ec168f4dede5
  style 1f4261c6_759e_7549_6b2c_c23373904f85 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight-parcel/src/client.tsx lines 45–60

async function navigate(pathname: string, push = false) {
  let res = fetch(pathname, {
    headers: {
      Accept: 'text/x-component',
    },
  });
  let root = await createFromFetch<ReactElement>(res);
  startTransition(() => {
    updateRoot!(root, () => {
      if (push) {
        history.pushState(null, '', pathname);
        push = false;
      }
    });
  });
}

Domain

Subdomains

Frequently Asked Questions

What does navigate() do?
navigate() is a function in the react codebase, defined in fixtures/flight-parcel/src/client.tsx.
Where is navigate() defined?
navigate() is defined in fixtures/flight-parcel/src/client.tsx at line 45.

Analyze Your Own Codebase

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

Try Supermodel Free