I am new to the react js.Here I am developing a PWA application using react-redux. Here, I am trying to restrict the user to not use a home or recent button if used, display a pop-up when the browser is opened again.

What I have tried is ,

componentDidMount() {
window.addEventListener("blur", this.onblur)

componentWilUnmount() {
window.removeEventListener("blur", this.onblur);

onblur = () => {

This is what I have tried. can any one help me with this ?

Your Answer


Browse other questions tagged or ask your own question.