What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-12 14:45:22
react prevent back
const preventBack = (): void => { window.history.pushState(null, "", window.location.pathname); } const handleBack = (): void => { console.log('handleBack') } useEffect(() => { preventBack(); window.addEventListener('popstate'... Add solution -
Javascript 2021-11-12 02:07:19
detect back button press javascript
So as far as AJAX is concerned... Pressing back while using most web-apps that use AJAX to navigate specific parts of a page is a HUGE issue. I don't accept that 'having to disable the button means you're doing something wrong' and in fact developers in ... Add solution -
Javascript 2021-11-11 04:37:17
react-router in saga
/** history.js ****/ import {createBrowserHistory} from 'history' export default createBrowserHistory({your_config_here}) /** saga.js ***/ import {... call} from 'redux-saga/effects' import history from './history' export default function* your_root_sag... Add solution
Best helpers
Joker13
+5
Remmy Kasili
+5
Anand GV
+5
Manx rat
+5
Jokim
+5
Nitro2k01
+5
Letomkov
+5
Glob Cropper
+5