Holy Loader is a lightweight, customizable top loading progress bar component for React / Next.js 13 & Next.js 14. #toploader #top-loader #nextjs-toploader #nprogress #nextjs-progressbar
The previous implementation of patching the History API methods (pushState and replaceState) was causing them to increasingly nest within patched versions of themselves.
To fix this, a new flag isHistoryPatched was introduced to prevent redundant patching. The stopProgressOnHistoryUpdate function now checks if the flag is already set before applying the patch. Additionally, the flag is set to true after the patching is done to ensure it is only applied once.
The previous implementation of patching the History API methods (pushState and replaceState) was causing them to increasingly nest within patched versions of themselves.
To fix this, a new flag
isHistoryPatched
was introduced to prevent redundant patching. ThestopProgressOnHistoryUpdate
function now checks if the flag is already set before applying the patch. Additionally, the flag is set totrue
after the patching is done to ensure it is only applied once.Reference: https://github.com/TheSGJ/nextjs-toploader/pull/68
Furthermore, this increases support for
router.push
.Reference: https://github.com/TheSGJ/nextjs-toploader/issues/71