I am thinking of not using window reload() but only react router 4 after this code:
this.props.history.push('/myPath')
then refresh the browser, is there a way to refresh the browser with react router 4?
I am thinking of not using window reload() but only react router 4 after this code:
this.props.history.push('/myPath')
then refresh the browser, is there a way to refresh the browser with react router 4?
You can just use location.reload();
. There's no need for react-router
to refresh.
Taken from SO