-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Is your feature request related to a problem? Please describe.
Nifty little library, thanks a lot. I would like to use it together with next-useQueryState aka nuqs which handles syncing state with query params, but I can't use the modified useRouter of this library for that.
Describe the solution you'd like
I have the current slightly hacky hook in my app that can be used with the loading state returned from useTransition from which the startTransition function is handed to the parser options which works but is a little hacky.
// eslint-disable-next-line import/no-extraneous-dependencies -- from next13-progressbar
import NProgress from 'nprogress';
import { useEffect } from 'react';
export const useShowNavLoadingBar = (loading: boolean) => {
useEffect(() => {
if (loading) NProgress.start();
return () => {
NProgress.done();
};
}, [loading]);
};It would be nice to include something like this in the library to trigger the NProgress bar imperatively or with a hook. Maybe just exporting the NProgress object from the library would be an option.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels