Add comprehensive reference documentation for: - Vitest: environments, projects/workspaces, type testing, vi utilities - Pinia: HMR, Nuxt integration, SSR setup - Vue: built-in components (Transition, Teleport, Suspense, KeepAlive) and advanced directives
29 lines
384 B
Markdown
29 lines
384 B
Markdown
---
|
|
category: Sensors
|
|
---
|
|
|
|
# useFps
|
|
|
|
Reactive FPS (frames per second).
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { useFps } from '@vueuse/core'
|
|
|
|
const fps = useFps()
|
|
```
|
|
|
|
## Type Declarations
|
|
|
|
```ts
|
|
export interface UseFpsOptions {
|
|
/**
|
|
* Calculate the FPS on every x frames.
|
|
* @default 10
|
|
*/
|
|
every?: number
|
|
}
|
|
export declare function useFps(options?: UseFpsOptions): ShallowRef<number>
|
|
```
|