Fabulous Speaker Line Up at GigCityElixir 2024! Clustering Elixir From Laptop to Cloud

Easy empty states for Phoenix LiveView streams using Tailwind

When rendering a collection in LiveView using streams, we commonly want to display a special empty state when the collection is empty. It’s tricky to do this with Elixir constructs like if/else, but fortunately there’s a neat trick we can use to get the desired behavior using Tailwind CSS.