Implement route-based code splitting with React.lazy #5

Closed
opened 2026-05-15 05:07:31 +00:00 by Mark · 0 comments
Owner

All pages are eagerly imported in src/App.tsx, loading the entire app upfront. Implement React.lazy() + Suspense for each route to reduce initial bundle size.

Routes to split:

  • /people → src/pages/People.tsx
  • /people/:id → src/pages/PersonDetail.tsx
  • /log → src/pages/LogInteraction.tsx
  • /dates → src/pages/Dates.tsx
  • /settings → src/pages/Settings.tsx

Add a loading fallback (e.g., src/components/Loading.tsx with a spinner).

File to modify: src/App.tsx

All pages are eagerly imported in `src/App.tsx`, loading the entire app upfront. Implement `React.lazy()` + `Suspense` for each route to reduce initial bundle size. Routes to split: - `/people` → `src/pages/People.tsx` - `/people/:id` → `src/pages/PersonDetail.tsx` - `/log` → `src/pages/LogInteraction.tsx` - `/dates` → `src/pages/Dates.tsx` - `/settings` → `src/pages/Settings.tsx` Add a loading fallback (e.g., `src/components/Loading.tsx` with a spinner). File to modify: `src/App.tsx`
Mark closed this issue 2026-05-16 06:30:18 +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/kimi_agent_kin_app_sync#5
No description provided.