link reload page react
//Go to link and refresh the page
<a onClick={() => {window.location.href="/something"}}>Something</a>
link reload page react
//Go to link and refresh the page
<a onClick={() => {window.location.href="/something"}}>Something</a>
react router remove location state on refresh
import createHistory from 'history/createBrowserHistory'
...
componentDidMount(){
const history = createHistory();
if (history.location.state && history.location.state.transaction) {
let state = { ...history.location.state };
delete state.transaction;
history.replace({ ...history.location, state });
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us