Skip to main content

Function: decodeStateFromHash()

decodeStateFromHash(hash): unknown

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

Decode a hash string produced by encodeStateToHash back to its state.

A leading # is tolerated. A malformed or empty hash yields null and never throws.

Parameters​

hash​

string

The encoded string, with or without a leading #.

Returns​

unknown

The decoded state, or null when the hash is empty or invalid.