Skip to content

[P0] Duplicate routers/providers in main.tsx and App.tsx #6

@cursor

Description

@cursor

Summary

BrowserRouter, ThemeProvider, and CssBaseline are instantiated in both main.tsx and App.tsx, creating nested routers and redundant contexts.

Impact

  • Double routing can cause navigation bugs
  • Extra renders from redundant context providers
  • Potential performance issues

Files Affected

  • src/main.tsx
  • src/App.tsx

Recommendation

Consolidate them into a single top-level wrapper (typically in main.tsx) and render App inside once to avoid double routing and extra renders.


Source: Code Review (PR #5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    copilot-assignedAssigned to GitHub Copilot Coding Agent

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions