Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

urgentcaremap-react

npm License: MIT React 17+

Drop-in React components and hooks for the free urgentcaremap.health API β€” 8,500+ US urgent care clinics across 386 cities.

🌐 Powered by urgentcaremap.health β€” the comprehensive US urgent care directory.

Install

npm install urgentcaremap-react

Quick Start

<UrgentCareList> β€” drop-in component

import { UrgentCareList } from "urgentcaremap-react";
function App() {
 return <UrgentCareList state="massachusetts" city="boston" limit={10} />;
}

That's it! The component handles loading, error, and empty states.

useClinics() β€” custom hook for full control

import { useClinics } from "urgentcaremap-react";
function ClinicFinder({ state, city }) {
 const { clinics, loading, error } = useClinics(state, city);
 if (loading) return <Spinner />;
 if (error) return <ErrorBanner message={error.message} />;
 if (!clinics?.length) return <Empty city={city} />;
 return (
 <MyCustomList>
 {clinics.map((c) => (
 <MyClinicCard key={c.id} clinic={c} />
 ))}
 </MyCustomList>
 );
}

Custom rendering

<UrgentCareList
 state="texas"
 city="austin"
 renderItem={(clinic, i) => (
 <div key={clinic.id} className="my-card">
 <h3>{clinic.name}</h3>
 <p>{clinic.address}</p>
 <a href={clinic.url}>View details β†’</a>
 </div>
 )}
/>

Props

<UrgentCareList> props

Prop Type Required Default Description
state string βœ“ β€” State slug (e.g., "massachusetts")
city string βœ“ β€” City slug (e.g., "boston")
limit number 10 Max clinics to show
className string "" CSS class for container
renderItem (clinic, idx) => ReactNode β€” Custom item renderer

useClinics(state, city) returns

Field Type Description
clinics Clinic[] | null Array of clinics (null while loading)
loading boolean True until first response
error Error | null Network/parse errors

Built-in client-side caching: 1 hour TTL per state/city combo.

Use Cases

  • Patient apps β€” show urgent cares near user
  • Telemedicine fallback β€” "Need in-person? Find here"
  • Real estate sites β€” neighborhood healthcare scoring
  • HR / corporate wellness β€” employee benefits portal
  • City tourism sites β€” visitor health resources

TypeScript

Full TypeScript support out of the box. Import types:

import type { Clinic } from "urgentcaremap-react";

Live Demo

See it in action: urgentcaremap.health/developers/examples/

License

  • Code: MIT
  • API/Data: CC-BY-4.0 β€” attribution included automatically by component

Citation

@misc{urgentcaremap2026,
 author = {Lorynec, Oleksandr},
 title = {UrgentCareMap: US Urgent Care Centers Database},
 year = {2026},
 publisher = {urgentcaremap.health},
 url = {https://urgentcaremap.health}
}

Related


Built with ❀️ on top of urgentcaremap.health β€” the free directory of urgent care clinics across the USA.

About

Drop-in React components and hooks for urgentcaremap.health API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /