Mid-Level Backend Engineer @ 7Mind, Germany Spice up your LiveView app with a cool loading spinner!

Elixir Streams |> LiveView's lifecycle hooks

Ever want to handle a LiveView action (event, message, patch, etc.) across several LiveViews without having to duplicate the code?

LiveView’s attach_hook/4 helper is the thing for you!

It allows us to tap into these lifecycle stages:

  • handle_event,
  • handle_params,
  • handle_info, and
  • after_render

Check out a short demo! đź‘€

Elixir Streams |> LiveView’s lifecycle hooks