MCPcopy Create free account
hub / github.com/dailydotdev/apps / nextOnPopState

Function nextOnPopState

packages/shared/src/hooks/useCloseOnBack.spec.ts:15–17  ·  view source on GitHub ↗
(event: PopStateEvent)

Source from the content-addressed store, hash-verified

13 // Next's own listener: registered first, it asks beforePopState before
14 // routing to the entry the browser moved to.
15 const nextOnPopState = (event: PopStateEvent) => {
16 nextRouted.push(beforePopState ? beforePopState(event.state) : true);
17 };
18
19 beforeAll(() => {
20 window.addEventListener('popstate', nextOnPopState);

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected