React 18 + Vite + TypeScript starter with a pre-configured service worker and a real update-available prompt. Static build, zero ongoing hosting cost.
Most PWA setups either update silently mid-session (confusing — the user's looking at code that changed under them) or never prompt at all (stale — they're stuck on an old build until they manually clear cache).
// ReloadPrompt.tsx — detects a waiting service worker const { needRefresh: [needRefresh, setNeedRefresh], updateServiceWorker, } = useRegisterSW({ onRegistered(r) { console.log('Service worker registered', r); }, onRegisterError(error) { console.error('Registration failed', error); }, }); // renders nothing until an update is actually waiting if (!needRefresh) return null;
onClick={() => updateServiceWorker(true)}>Update Now onClick={() => setNeedRefresh(false)}>Dismiss
Everything below ships in the single package — no tiers, one price.
Auto-update registration set up out of the box — no manifest or workbox config to write yourself.
The update-available banner shown above. Self-contained, no external state library required.
Planned for a future update: one master .svg in, every favicon / apple-touch / maskable icon size out. Not included in this release — see the notice below for a quick manual workaround.
A working sample component calling a backend payment endpoint (M-Pesa / Paystack) — a real starting point to adapt, not a themeable production component.
tenantId prop — it's not inferred
or defaulted. Always pass your real tenant identifier; see SETUP.md for detail.
public/.