apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.
https://www.npmjs.com/package/nextjs-progressbar
MIT License
786 stars 62 forks source link

Add "start delay" option #24

Closed jacknight closed 3 years ago

jacknight commented 3 years ago

Providing a start delay option means that pages which load faster than the start delay won't show the progress bar at all, which can be useful if you only want to see the progress bar when things are taking a little longer than usual.

jacknight commented 3 years ago

I see that this feature was already implemented and then removed.

I've tested this and am currently using it (npm i nextjs-progressbar-withdelay) and so far I don't have any issues. My implementation is slightly different than the previous attempt and maybe that makes the difference. Feel free to try it out in the npm package I published before merging. I tried it with demo-nextjs-progressbar as well, and it seems to work fine for me.