We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Implementing Empty States in Phoenix LiveView with Tailwind CSS
316
clicks
Source: phoenixonrails.com
George Arrowsmith discusses a challenge encountered when using streams in Phoenix LiveView, specifically in dealing with rendering empty states for collections that are empty. Since streams can't be checked for emptiness using conventional Elixir Enum methods, he describes an alternative approach using CSS pseudo-classes. This method leverages Tailwind's utility classes to display an empty state when a collection is empty. This approach is both functional and concise, allowing for clean template code while harnessing the powers of modern CSS.
Related posts
© HashMerge 2024