lustre_hash_state

Functions

pub fn get_hash() -> String

Returns the current window.location.hash value, including the octothorpe. It’s unlikely you’d call this directly, but public for convenience.

pub fn init(msg: fn(String, String) -> a) -> Effect(a)

The effect to be returned in your init method. Sets up hashchange event listener and sends messages to update.

pub fn noop() -> Effect(a)

A convenience method identical to effect.none()

pub fn parse_hash(query: String) -> Dict(String, String)

Parses a query string into a dict

pub fn stringify_hash(dct: Dict(String, String)) -> String

Converts a dict to a query string

pub fn update(key: String, value: String) -> Effect(a)

Updates the hash value.

Search Document