> 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/getaction.md).

# getAction

You can use registered Actions by passing the Action id to `getAction` method from Plugin-API

## How to use

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

import {
    useRef,
    useState,
    useCallback
} from 'react'

const Application = () => {
    const fetchAction = useRef(getAction('my-fetch-action'))
    const loggerAction = useRef(getAction('my-logger-action'))

    const [data, setData] = useState(null)

    const handleOnLoadMore = useCallback(() => {
        fetchAction.current('www.my-data.endpoint.com/json')
            .then(payload => {
                setData(payload)
            })
            .catch(error => {
                loggerAction.current(error)
            })
    }, [])

    return (
        <button onClick={handleOnLoadMore}>
            {'Load more'}
        </button>
    )
}

export {
    Application
}
```
