---
updatedAt: 2025-09-18T14:37:32.000Z
agentTools:
  projectIndex: https://developers.intandem.tech/llms.txt
---

# getState

Used to get the state of the hosting entity (a page where an app is embedded or the widget containing an iframe)

## Syntax

```javascript
import messageHandler from '@vcita/intandem-app-com';	

// ...initialize the handler

messageHandler.getState().then(function(state){//do something});
  
  // or
  
let status = await messageHandler.getState();
```

## The State object

1. **`hostName`** *(String)*: The current host name
2. **`hostType`** *(String)*: The type of the host - **page** | **widget**
3. **`view`** *(String)*: Is the page in a "team" mode or in a "my view" mode - **team** | **my\_view**

```json
{
  "hostName": "home",
  "hostType: "widget"
  "view": "team"
}
```

<br />

<HTMLBlock>{`
<link  as="style" href="https://vcita.github.io/developers-hub/styles.css" rel="stylesheet">
`}</HTMLBlock>