notajson.dev
← All work

case study 02 · lead · multi-portal talent platform · React 19, RSBuild, Zustand

Two generations in production

The new apps had to replace the old ones a page at a time, while agencies kept working in both. The hard part wasn't React 19. It was routing, sign-in and shared UI across two stacks.

// from the production branch

3React versions live in production at once
6route families served by v2 on desktop; the rest fall back to v1
1login shared by both stacks

Route counts from the agency app's v2 route list on its production branch.

Context

The platform started as a Lerna monorepo of React 17 apps. The new generation is standalone React 19 apps built with RSBuild, sharing a component library at runtime. Both generations serve real users at the same time, and some pages exist in both on purpose.

Constraints

  • Agencies couldn't stop working while pages moved, so the old app stayed live for every page not yet rebuilt.
  • React 17, 18 and 19 all run in production, and each repo has its own package manager.
  • Mobile and desktop versions of the same page are rebuilt at different times.
  • Users sign in on the old app, so the new one has to accept that session.

Decisions

Open each one for the trade-off behind it.

Every signed-in route goes through one guard. A path stays in the new app only if it is on the v2 list; anything else is sent to the matching v1 page, with its ids carried over. Mobile and desktop have separate lists, because the new mobile and desktop views ship at different times. Moving a page to v2 is one line on a list, and moving it back is the same line removed.

What I built

  • The agency app's v2 shell: routing, the auth guard that redirects to v1, layout, header and sidebar, then the service layer with the API client, token handling and React Query.
  • The sign-in handoff from v1 to v2, with the tokens cleared from the URL before the first request.
  • The v2 versions of Quick Submit, Projects, Roles and parts of the Worksheet.

Result

Quick Submit, Projects, the Worksheet, Settings and the packages Quick Submit now run on v2 in production, on desktop and mobile. Every other route still goes to v1, so agencies never hit a page that doesn't exist yet. Both generations deploy on their own, and the shared library keeps their UI in step.

What I'd do differently

Treat the handoff URL as a credential from the first commit. The first version left the token in the address bar after sign-in. Removing it came a month later, and it should have been there from the start.