#Popstate event listener not working with app router

1 messages · Page 1 of 1 (latest)

vivid pawn
#

Hi I want to listen for history changes and I am using popstate listener but when I click nextjs links or call router.push listener is not triggered.

addEventListener("popstate", () => console.log("POPSTATE"))