mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 19:04:46 +00:00
28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
# @robonen/vue
|
|
|
|
Collection of composables and utilities for Vue 3.
|
|
|
|
## Install
|
|
|
|
```bash
|
|
pnpm install @robonen/vue
|
|
```
|
|
|
|
## Composables
|
|
|
|
| Category | Composables |
|
|
| -------------- | ------------------------------------------------------------------ |
|
|
| **browser** | `useEventListener`, `useFocusGuard`, `useSupported` |
|
|
| **component** | `unrefElement`, `useRenderCount`, `useRenderInfo` |
|
|
| **lifecycle** | `tryOnBeforeMount`, `tryOnMounted`, `tryOnScopeDispose`, `useMounted` |
|
|
| **math** | `useClamp` |
|
|
| **reactivity** | `broadcastedRef`, `useCached`, `useLastChanged`, `useSyncRefs` |
|
|
| **state** | `useAppSharedState`, `useAsyncState`, `useContextFactory`, `useCounter`, `useInjectionStore`, `useToggle` |
|
|
| **storage** | `useLocalStorage`, `useSessionStorage`, `useStorage`, `useStorageAsync` |
|
|
| **utilities** | `useOffsetPagination` |
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { useToggle, useEventListener } from '@robonen/vue';
|
|
``` |