@yjhtry/react-components
v0.0.4
Published
react component library
Downloads
2
Readme
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>
)
}