Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 577 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 577 Bytes

React components library

Components

  • NProgressBar

If you want to show a progress bar, when changing the route. In the component, had listener a tag click event, and show the progress bar and hide it after the route change.

But if you used api to change the route, you need to call NProgressBar.start() manually.

function onChangingRoute() {
  NProgressBar.start()
  router.push('/new-route')
}

Usage

import { NProgressBar } from '@yjhtry/react-components'

function App() {
  return (
    <div>
      <NProgressBar />
    </div>
  )
}