> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/app/is-hub-connected.md).

# Is Hub Connected

If the user's hub is connected to the app

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onIsHubConnectedChange = (value: boolean, timestamp?: Date) => {
    console.log(value, timestamp);
};


COBI.app.isHubConnected.read(onIsHubConnectedChange); // Instantly get the current value
COBI.app.isHubConnected.subscribe(onIsHubConnectedChange);
COBI.app.isHubConnected.unsubscribe(onIsHubConnectedChange);
```

{% content-ref url="/pages/O3KsMM8kiH6KV3eK4qyS" %}
[Placemark](/cobi.bike/entities/placemark.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}

```javascript
const onIsHubConnectedChange = (value, timestamp) => {
    console.log(value, timestamp);
};


COBI.app.isHubConnected.read(onIsHubConnectedChange); // Instantly get the current value
COBI.app.isHubConnected.subscribe(onIsHubConnectedChange);
COBI.app.isHubConnected.unsubscribe(onIsHubConnectedChange);
```

{% endtab %}
{% endtabs %}
