VoileWeb.Live.Hooks.CurrentPath (Voile v0.1.31)

Copy Markdown View Source

LiveView on-mount hook that ensures :current_path and :current_uri are available in assigns for all LiveViews, and kept up-to-date on navigation.

  • Seeds initial assigns from the HTTP session (set by VoileWeb.Plugs.GetCurrentPath).
  • Attaches a :handle_params hook so values are refreshed on live navigation (push_patch/push_navigate).