Closed shangsunset closed 8 years ago
You should be able to pass your data to the component, via ajax.
@shangsunset , The idea is to manage by state
object .. Then you will be able to update the component by calling setState
... this is an example (pseudo code) :
componentDidMount() {
fetchFromServer((donePercentage) => {
// assuming that donePercentage is a number from 0 to 1.
this.setState({completed: donePercentage*100 })
});
}
render() {
return (<Progress completed={this.state.completed || 0} />)
}
@abdennour thanks for the reply. I guess my question is how to pass donePercentage
from backend to front end constantly in the first place. do you keep calling fetchFromServer
to get different donePercentage
or is there any way better?
Hey,
Can you use this module to show the progress when fetching data from a server? if so, how would you do it? Thanks.