LiveView LiveComponents article

I’m excited about the new LiveComponents feature in LiveView, but I haven’t seen much written on it, so I decided to write a couple of articles based on a talk I gave at our Portland, Oregon Elixir meetup. The first article is an introduction to LiveComponents and is available now. The second one will be out later next week and walk through a more elaborate example.

You can find the first article here:

23 Likes

Thank you, bookmarking this!

Hi,

Could you please update the mount definitions in the LiveComponents to contain only the socket? (https://hexdocs.pm/phoenix_live_view/Phoenix.LiveComponent.html#c:mount/1) . If we follow your article, and add internal state to the LiveComponents, it doesn’t work : Livecomponent: assign @value not available in eex template. Why such behaviour?
Thanks.

1 Like

Thanks for pointing that out. It is fixed now.

I have just updated the article and code to LiveView 0.6.0.