Skip to content

useFps ​

Hook that measures frames per second

sensors
test coverage
Last changed: last month

TIP

This hook uses requestAnimationFrame browser api to provide enhanced functionality. Make sure to check for compatibility with different browsers when using this api

Installation ​

Library
CLI
Manual
typescript
import { useFps } from '@siberiacancode/reactuse';

Usage ​

typescript
const fps = useFps();

Demo ​

Api ​

Returns

number

Source ​

Source • Demo

Contributors ​

D
debabin
debabin
H
hywax
hywax
D
Dmytro
Dmytro

Released under the MIT License.