react pace
npm install react-pace-progressReact Pace Progress is a simple [pace]-style progressbar component.
The only way to use React-Pace-Progressbar is to install it from NPM.
```
$ npm install react-pace-progress --save
You need to import it and include in your own React build progress (using Webpack, e.g).
``
import Pace from 'react-pace-progress'
Use Pace like any other react component. Pace renders a thin horizontal progressbar infinitely approaching 100%. It never reaches 100%.
``
// inside your react component
load = ()=>{
this.setState({isLoading: true});
fetch().then(()=>{
// deal with data fetched
this.setState({isLoading: false})
})
};
render(){
return (
{this.state.isLoading ?
... content
)
}
Use props to custom Pace component.
- height: number, progressbar height in pixels.string`, progressbar color.
- color:
[pace]: http://github.hubspot.com/pace/