> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/dashboard-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/dashboard-plugin/api-and-gui/api/sethealth.md).

# setHealth

## How to use

```javascript
import { Plugin } from '@root'

Plugin.setHealth(true)
```

#### example

```javascript
import { Plugin } from '@root'

import {
    useState,
    useEffect
} from 'react'

const App = () => {
    const [connected, setHealth] = useState(false)

    useEffect(() => {
        if (connected) {
            Plugin.setHealth(true)
        }
    }, [connected])
}
```

{% hint style="info" %}
You can also call setHealth from the Agent, if you have a websocket connection for example
{% endhint %}
