# useLayers

The data layer catalogue: a store of the host's layer definitions and
whether they have loaded. Read it with `useSyncExternalStore` and pass
`getState` as the server snapshot, as `useDataLayers` does.

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

## Signature

```ts
import { useLayers } from "@mapcairn/map";
 
function useLayers(): LayerCatalogue;
```

## Returns

`LayerCatalogue`

## See also

- [`LayerCatalogue`](https://docs.mapcairn.com/api/core/LayerCatalogue.md)

Source: [packages/map/src/services/hooks.ts:209](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/services/hooks.ts#L209)
