StatsHub Docs
Features

Widgets and reminders

Home-screen widgets for a countdown, a live score and a hit rate, plus match reminders — the app outside the app.

src/widgets · src/lib/core/match-reminders.ts · the expo-widgets config in app.json

Three widgets

WidgetWhat it showsConfigurable
CountdownTime to kick-offCountdown, or kick-off time
LiveScoreThe scoreScore and scorers, or score only
HitRateA player's hit ratePercentage, or recent record

Each is configurable from the widget itself — long-press, edit, done. The options are declared in app.json under the expo-widgets plugin, so the choices a user sees and the values the code reads are one definition.

Why they matter more than they look

A widget is the app's only surface for someone who has not opened it. A countdown to a match they care about is a reason to open it; a stale score is a reason not to.

src/widgets/widget-runtime.test.ts and widget-image.ts are the parts that run outside React entirely, which is why they are tested as plain modules.

Reminders

match-reminders.ts owns the notification scheduled before a fixture. Its tests cover repeat scheduling because sending the same reminder twice is as broken as silently scheduling none.

Notifications go through expo-notifications; permission is asked when a reminder is first set, not on launch, so the prompt arrives with a reason attached.

On this page