Skip to main content

Function: onUrlStateChange()

onUrlStateChange(cb): () => void

Defined in: src/serialization/urlState.ts:206

Listen for hashchange and call cb with the newly decoded state.

Parameters​

cb​

(state) => void

Called with the decoded state (or null) on every hash change.

Returns​

An unsubscribe function. A no-op when there is no DOM.

(): void

Returns​

void