Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urgentcaremap-react

npm License: MIT React 17+

Drop-in React components and hooks for the free urgentcaremap.health API8,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