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

***

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

# Function: getSharedStore()

> **getSharedStore**(): [`SharedStore`](../interfaces/SharedStore)

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

Get the active `@shared` room store (the in-process default, or whatever was
installed via [setSharedStore](setSharedStore)). Rarely needed in app code — `@shared`
props read/write it automatically — but useful for tests or admin tooling that
inspects room state directly.

## Returns

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

The current [SharedStore](../interfaces/SharedStore).

## Example

```tsx
// A collaborative counter: every subscriber to `room.lobby` converges on `count`.
class Counter extends Component {
  @shared("room.lobby") count = 0;
  @expose increment() { this.count++; } // written back + broadcast on commit
}
```
