[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / setSharedStore

# Function: setSharedStore()

> **setSharedStore**(`store`): `void`

Defined in: [flow/src/shared.ts:76](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/shared.ts#L76)

Replace the process-wide backing store for `@shared` room state. Call this once
at boot to move convergence off the default in-process map onto a distributed
backend so it fans out across server instances.

## Parameters

### store

[`SharedStore`](../interfaces/SharedStore)

The store implementation to install.

## Returns

`void`

## Example

```ts
// boot: converge @shared state across all app instances via Redis.
setSharedStore(new RedisSharedStore(redis));
```
