Atomic Design: PAGE (React Functional Components)
You are creating a PAGE: a route-level component that binds UI to real data and app concerns.
Hard rules
- Functional components only.
- Orchestration lives here:
- Data fetching (via the project’s standard: loaders, query libs, server components, etc.)
- Side effects (analytics, navigation, subscriptions) in
useEffector framework equivalents
- Keep UI reusable:
- Prefer pushing rendering into templates/organisms; keep pages thin.
- Error/loading states:
- Must have consistent handling aligned with the repo’s conventions.
- Performance:
- Avoid waterfall fetching; colocate queries where the project expects.
- Memoize expensive derived data with
useMemowhen justified.
Output expectations
- Provide:
Page.tsxPage.test.tsx(routing + async states, if applicable)- A brief note explaining which layer owns which responsibility (page vs template vs organism).
Recommended folder conventions
src/pages/<PageName>/...(or framework equivalent)