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

***

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

# Function: expose()

> **expose**(`_value`, `context`): `void`

Defined in: [flow/src/decorators.ts:416](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/decorators.ts#L416)

The opt-in network boundary: makes a member reachable from the client and crosses the wire.

## Parameters

### \_value

`unknown`

### context

`ExposeContext`

## Returns

`void`

## Remarks

On a **field**, the property is included in the snapshot and is mutable by the client (e.g. via
`flow:model`), so it round-trips both directions. On a **method**, the method becomes callable
from the browser over the WebSocket as an action. Nothing not marked (directly or via a
decorator that implies it, such as `@locked`, `@task`, `@on`, `@reactive`, `@modelable`,
`@presence`, `@shared`) is exposed. Rejected on a getter/accessor — use `@computed` for a
derived value, or an `@expose` field for client-writable state.

## Example

```tsx
class Counter extends Component {
  @expose count = 0;

  @expose increment() {
    this.count++;
  }
}
```
