Menu

SPA-Style Tab Switching & Lifting State Up

SPA-Style Tab Switching & Lifting State Up

A. Unlike projects that use client-side routing to switch between URLs, this app uses SPA-style tab switching — clicking "Browse Jobs" or "My Applications" (and, on the Employer side, "Dashboard", "Manage Jobs", or "Applicants") doesn't navigate anywhere; it just updates an activeTab state value, and the page conditionally renders whichever section matches.

This keeps everything on one single page component with no page reloads, while still feeling like separate screens to the person using it.

B. Lifting state up is the pattern of keeping a piece of state in a common parent so multiple components can share and affect it.

Right now, JobSeekerPage and EmployerAdminPage each hold their own separate copies of jobs and applications.

The planned next step is to lift both of those state values up into one shared parent component (or a Context), so that a job posted by the employer instantly appears for job seekers, an application submitted by a job seeker instantly appears for the employer, and a status change made by the employer instantly reflects back in the job seeker's "My Applications" tab — all without a backend, purely through shared React state.