Answer the question
In order to leave comments, you need to log in
How to update a React.js component?
There is such a thing
<Route path="/" component={App}>
<IndexRoute component={Main} />
<Route path="data" component={Data} />
<Route path="about" component={About} />
</Route>
Answer the question
In order to leave comments, you need to log in
in the Data component:
componentDidMount() {
this.refresher = setInterval(1000, () => this.forceUpdate())
}
componentWillUnmount() {
clearInterval(this.refresher)
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question