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) -> 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 update(s: String) -> Effect(a)

Updates the hash value.

Search Document