'NProgress in react is not dynamic

I have an issue concerning react's nprogress (slim progress bar). the bar will never end loading since the itsFinished prop is not initialized , how can I make the bar loads dynamically to the page when it's done refreshing ? here is the code :

const Progress = ({ isAnimating }) => {
  const { animationDuration, isFinished, progress } = useNProgress({
    isAnimating,
  })

  return (
    <Container animationDuration={animationDuration} isFinished={isFinished}>
      <Bar animationDuration={animationDuration} progress={progress} />
    </Container>
  )
}

const Navbar = () => {
.
.
.
<Progress  animationDuration={300}
        incrementDuration={500}
        isAnimating
        minimum={0.1} />

Container and Bar are custom components !



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source