# @subscribe

Read-only binding: **only** `DataProviderKey<T>` (no legacy string path). No `reflect` option — the publisher updates the property, not the other way around.

For bidirectional binding or string paths, use [@bind](#docs/_decorators/bind.md/bind).

## Import

<sonic-code language="typescript">
  <template>
import { subscribe } from "@supersoniks/concorde/decorators";
import { DataProviderKey } from "@supersoniks/concorde/dataProviderKey";
//
type Data = { count: number };
const dataKey = new DataProviderKey<Data>("data");
//
@subscribe(dataKey.count)
@state()
count = 0;
  </template>
</sonic-code>

## Highlights

- Strict typing: the property type must match `T`.
- Dynamic paths: placeholders in `DataProviderKey`, resolved from the host component’s properties.

## Demo

<sonic-code>
  <template>
    <demo-subscribe-dynamic></demo-subscribe-dynamic>
  </template>
</sonic-code>

See also [DataProviderKey](#docs/_misc/dataProviderKey.md/dataProviderKey).
