Building Embedded Web Apps with LiveState in Elixir

205
clicks
Building Embedded Web Apps with LiveState in Elixir
Chris Nelson explored the construction of 'SPA' type embedded web applications with a library called LiveState in his ElixirConf 2022 talk. LiveState allows developers to build apps within larger web pages that they don't control, something not viable with LiveView. With LiveState, developers handle events and state server-side, in a similar fashion to LiveView, but without the necessity for an API to handle requests and responses. The library runs on Phoenix channels, leverages custom elements, and utilizes JSON patch for state management. Nelson also details how LiveState handles client-server communication, maintaining state, and processing events with Elixir's functional iteration of event-state-reducer pattern. His demo showed an embedded live support chat app integrated with Discord, showcasing the practical application of LiveState. The library is still in early development, but resources and collaboration opportunities are available for interested developers.

© HashMerge 2024