Recent Country Store
Persists the countries a user has recently chosen, so the sheet can offer them first.
Only ISO alpha-2 codes cross this boundary — never search queries, and never anything else the user typed. Recording a country the user picked is a preference; recording what they searched for is tracking, and this interface makes the former impossible to confuse with the latter.
Hosts that must not persist anything (kiosk, guest, incognito modes) pass NoOpRecentCountryStore or set showRecentlySelected = false in the config.
Inheritors
Functions
Link copied to clipboard
Emits the recent ISO alpha-2 codes, most recent first, whenever they change.
Link copied to clipboard
Records that the user selected countryCode, moving it to the front.