use-article-progress
v0.2.0
Published
Simple hook to get the progress (0-100%) when reading an article. Changes as the user scrolls the page.
Downloads
2
Readme
useArticleProgress
hook
Simple hook to get the progress (0-100%) when reading an article. Changes as the user scrolls the page.
Usage
export function ArticleProgress() {
const { percentage } = useArticleProgress();
return <div>{percentage}%</div>;
}
Project Example
Check an example of usage inside /example
folder.
cd example
yarn
yarn start
# open localhost:1234