Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

hi, it is possible to detect on react that the page is rendering by a ctrl+shift+t command?

$
0
0

it is possible to detect on react that the page is rendering by a ctrl+shift+t command ? for example, i need to detect this situation:

  1. The user closes the browser tab
  2. Then the user press ctrl+shift+t to re-open the tab
  3. I then identify that the tab was opened from a ctrl+shift+t command

Is this possible ? How ?

Update:I have this piece of code on my page:

    useEffect(() => {    function handleResize() {        //some stuff    }    window.addEventListener('popstate', handleResize);    return function cleanupListener() {      console.log('backing')      window.removeEventListener('popstate', handleResize);    };  }, []);

When i click to go to this page, i make a history.push(/chat).Then if i click on back button the console.log 'backing' is shown.But if i close the tab and re-open, if i click on back button, the console.log doesn't show :/

Thanks in advance


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>