# useSelectionStore

The store of selected features, or `undefined` when the host supplies none.
Nothing in the ui selects a feature without it. A component that needs the
set to follow changes reads it with `useSyncExternalStore`, passing
`getState` as the server snapshot.

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

## Signature

```ts
import { useSelectionStore } from "@mapcairn/map";
 
function useSelectionStore(): FeatureSelection | undefined;
```

## Returns

`FeatureSelection | undefined`

## See also

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

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