useRafValue ​
Hook that returns the value and a function to set the value
utilities
test coverage
Last changed: last month
Installation ​
Library
CLI
Manual
typescript
import { useRafValue } from '@siberiacancode/reactuse';
Usage ​
typescript
const [value, setValue] = useRafValue(initialValue);
Demo ​
Api ​
Type declaration ​
typescript
export type UseRafValueReturn<Value> = [Value, (value: Value) => void];
Source ​
Source • DemoContributors ​
D