[MEDIUM] Extract inline view components from App.tsx into separate files #45

Closed
opened 2026-06-09 00:03:13 +00:00 by Mark · 0 comments
Owner

Locations: src/App.tsx — Sidebar, MobileMenu, DashboardView, CalendarView, SubscriptionsView, SettingsView, all defined as inline arrow-function constants

Problem: New component functions allocated on every App render. Triggers unnecessary child reconciliations. Prevents tree-shaking and lazy-loading of views.

Impact: Slower reconciliation; larger initial bundle.

Fix: Extract to src/views/ directory. Lazy-load with React.lazy(() => import(./views/...)).

Effort: ~2-3 hours

**Locations:** `src/App.tsx` — `Sidebar`, `MobileMenu`, `DashboardView`, `CalendarView`, `SubscriptionsView`, `SettingsView`, all defined as inline arrow-function constants **Problem:** New component functions allocated on every `App` render. Triggers unnecessary child reconciliations. Prevents tree-shaking and lazy-loading of views. **Impact:** Slower reconciliation; larger initial bundle. **Fix:** Extract to `src/views/` directory. Lazy-load with `React.lazy(() => import(./views/...))`. **Effort:** ~2-3 hours
Mark closed this issue 2026-06-13 21:00:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/subvault#45
No description provided.