apal21 / nextjs-progressbar

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

The `showOnShallow` option gets ignored during shallow routing #78

Closed mschaul closed 2 years ago

mschaul commented 2 years ago

The issue I ran into is that using shallow routing causes the progressbar to appear even with the showOnShallow option set to false. The main problem is that Next.js 12.2 fires the routeChangeError event unnecessarily. I have already reported it on their repo, but this also surfaced an issue with this component. The routeChangeError has a different function signature than routeChangeComplete, meaning the shallow routing flag gets ignored and the progressbar gets display even with showOnShallow set to false.

I found a previous mention of this issue here: https://github.com/apal21/nextjs-progressbar/issues/70#issuecomment-1061533686, but it looks like it has not been fixed yet.

ditkachuk commented 2 years ago

@apal21 can you add new version in npm rep?

seyyed-sina commented 1 year ago

I just check it in v0.0.16 It works now! Thanks