Slide 32
Slide 32 text
© LayerX Inc. 32
stopImmediatePropagation()
addEventListener() earlier than Next.js, then stopImmediatePropagation() to suppress
Suppresses event listeners
added later than this
window.addEventLisnter("popstate", () => ...)
window.addEventLisnter("popstate", e => e.stopPropagation())
window.addEventLisnter("popstate", () => ...)
window.addEventLisnter("popstate", () => ...)
window.addEventLisnter("popstate", e => e.stopImmediatePropagation())
window.addEventLisnter("popstate", () => ...) ←Listener in Next.js won’t be called