What's new in v3
The new features in BProgress v3
New features
ProgressProvider
The component ProgressBar
has been replaced by ProgressProvider
. This provider contains the ProgressBar
component and some methods with the useProgress
hook to control the progress bar.
useProgress
The useProgress
hook is used to manipulate the progress state.
Progress components
You can now add one or more progress bars anywhere in your code.
Warning
The Progress
component must be used inside the ProgressProvider
with the option template
set to null
.
This, combined with the disableStyle
property, allows you to make your progress using TailwindCSS only.
useRouter
(only for App directory)
A new basePath
option has been added to the router.
This option is only useful if you use a basePath
in your next.config.(js|mjs|ts)
file.
You can also pass the options directly on the useRouter
hook if you want to use the same options for all router actions.
Note
By default, if you do not specify any options when calling a router method, the options defined during the initialization of the useRouter
hook will be applied. However, if you provide specific options in the method call (push
, replace
, back
, refresh
), these will take precedence and override the default options set in the hook.
Roadmap
The package is destined to evolve into the best progress bar solution.
We have defined a Roadmap to provide greater visibility on future developments. This will evolve over time.