# createDrawReducer

Builds a drawing reducer that names the shapes it creates with `labels`
(the shipped English when none is given): pass a catalogue so a new shape is
called "Veelhoek 1" rather than "Polygon 1". Pure, as [`drawReducer`](https://docs.mapcairn.com/api/core/drawReducer.md).

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

## Signature

```ts
import { createDrawReducer } from "@mapcairn/core";
 
function createDrawReducer(labels?: Pick<MessageCatalogue, "t">): (state: DrawState, action: DrawAction) => DrawState;
```

## Parameters

- `labels?` (`Pick<MessageCatalogue, "t">`)

## Returns

`(state: DrawState, action: DrawAction) => DrawState`

## See also

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

Source: [packages/core/src/draw/reducer.ts:759](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/draw/reducer.ts#L759)
