# 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 %}
