Skip to main content

ServicesProvider

Makes the app's services available to every component below it. This is the only way components reach adapters, browser services or map engines, so tests can swap in fakes by wrapping a tree in this provider. It also keeps which basemaps are not working (see useBasemapAvailability) and the active message catalogue (see useMessages).

This is a function exported by @mapcairn/map, checked against version 0.2.0.

Signature​

import { ServicesProvider } from "@mapcairn/map";

function ServicesProvider(input: ServicesProviderProps): JSX.Element;

Parameters​

  • { services, children, }
  • input (ServicesProviderProps)

Returns​

JSX.Element

See also​

Source: packages/map/src/services/ServicesProvider.tsx:25