setHealth

How to use

import { Plugin } from '@root'

Plugin.setHealth(true)

example

import { Plugin } from '@root'

import {
    useState,
    useEffect
} from 'react'

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

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

You can also call setHealth from the Agent, if you have a websocket connection for example

Last updated