useRegions
Every region, with event/competition counts when filtered. One-shot, not a subscription.
Wraps regions.list(). eventCount/competitionCount are only populated
on each region when at least one filter (date, sports, status) is
passed; with no filters you get every region with no counts.
Installation
pnpm dlx shadcn@latest add https://mrdoge.co/r/use-regions.jsonAlso requires MRDOGE_ODDS_API_KEY. Set it in your own environment after installing.
Installing this pulls in two files: the hook itself (a thin re-export
from @mrdoge/react, which does the
real work) and a Next.js route at app/api/mrdoge/token/route.ts that
mints short-lived tokens using @mrdoge/node and your own
MRDOGE_ODDS_API_KEY. The browser client never sees the raw key.
Usage
import { useRegions } from "@/hooks/use-regions"
const regions = useRegions({ sports: ["soccer"], date: "2026-08-06" })Takes a single options object, like every real SDK method it wraps
(regions.list(params)), not positional arguments. Only resolves which
regions have matches; pair it with
useMatches's regionIds to
actually fetch them.
Parameters
Prop
Type
Returns
Region[] | null | undefined: undefined while the request is in flight,
null if it failed (no fallback data), otherwise the list. One-shot: this
doesn't push live updates; call it again (or remount) to refresh.