# tourReducer

Applies an action to the tour. Pure: an action that changes nothing
returns the same state. `start` always begins at the first step, so Help
can restart a running tour; `next` past the last step shows the ending.

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

## Signature

```ts
import { tourReducer } from "@mapcairn/core";
 
function tourReducer(state: TourState, action: TourAction): TourState;
```

## Parameters

- `state` (`TourState`)
- `action` (`TourAction`)

## Returns

`TourState`

## See also

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

Source: [packages/core/src/tour/tour.ts:59](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/tour/tour.ts#L59)
