← All case studies
CheckoutNext.js · React SPAEXP-06Jul – Aug 2026

SA daily-deals marketplace · Daily deals, South AfricaGuest and login as equal-weight checkout tabs

The checkout entry step was login-first, with guest checkout as a text link below the fold on mobile. The variant gives both paths a tab, defaults to guest, and prefills the native form without fighting React.

ClientSA daily-deals marketplace
PlatformNext.js · React SPA
PageCheckout
Measured onEntry-step progression, Completed orders
Observation
  • Guest checkout existed but was easy to miss, especially on a phone.
  • The login page could render under a guest-looking URL, so any logic keyed on the query string would target the wrong step.
  • Styling hooks were unstable: generated CSS class names and React IDs changed between builds.
Hypothesis

Presenting guest and login as equal tabs, with guest selected by default, will reduce abandonment at the checkout entry step.

What I built
  • Two-tab interface replacing the login-first entry. The guest tab collects email and name and continues to delivery; the login tab reveals the native form through a body-class stylesheet with nothing removed.
  • Guest continue clicks the hidden native guest button, then fills the native inputs through React's own value setter so the framework registers the change.
  • A sync tick that runs immediately and every four seconds from page load, surviving SPA navigation and re-renders.
  • Thirty-two Playwright checks against production on desktop and mobile before hand-off.
The hard parts

Trust the structure, not the URL

Gating moved to what is on the page: a password field means login, a guest email field means guest. The password check runs first so ambiguity fails safe.

Writing into a hydrating form

Values are only set once a node shows React's internal markers, kept refilled while empty, and marked done only after surviving five seconds of ticks. A focused field is never touched, so anything the visitor types wins.

Outcome

Measured on entry-step progression, completed orders. Test results belong to the client and are shared in conversation, with their permission, rather than published here.

More experiments

View all →