Hooks
Compilation of custom hooks that are common in our apps.
Installation
NPM
npm install @availity/hooks
Yarn
yarn add @availity/hooks
Available Hooks
| Hook | Description |
|---|---|
| useCurrentUser | Returns the current user |
| useCurrentRegion | Returns the user's current region |
| useOrganizations | Returns organizations |
| usePermissions | Returns user permissions |
| useProviders | Returns providers |
| useMount | Runs a function on mount/dismount |
| useTimeout | Returns true after a given delay |
| useToggle | Returns a toggleable boolean |
| useUpdateNav | Syncs route changes with the portal nav |
| useWindowDimensions | Returns window height and width |
| useStash | Returns data from the Stash API |
| useEffectAsync | (Deprecated) Async useEffect wrapper |