|
Download react-use/docs/useTween.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 732 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useTween.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-use/docs/useTween.md
-
curl -L -o useTween.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-use/docs/useTween.md
732 Bytes
useTween
React animation hook that tweens a number between 0 and 1.
Usage
import {useTween} from 'react-use';
const Demo = () => {
const t = useTween();
return (
<div>
Tween: {t}
</div>
);
};
Reference
useTween(easing?: string, ms?: number, delay?: number): number
Returns a number that begins with 0 and ends with 1 when animation ends.
easing— one of the valid easing names, defaults toinCirc.ms— milliseconds for how long to keep re-rendering component, defaults to200.delay— delay in milliseconds after which to start re-rendering component, defaults to0.