# Conditional rendering in LiveView template

**URL:** <https://forum.elixirforum.com/t/conditional-rendering-in-liveview-template/30737>\
**Category:** Questions\
**Tags:** phoenix, templates, liveview\
**Created:** [April 18, 2020, 4:29pm UTC](https://forum.elixirforum.com/t/conditional-rendering-in-liveview-template/30737 "2020-04-18T16:29:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![NobbZ](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/32/27235_2.png) [@NobbZ](https://forum.elixirforum.com/u/NobbZ)\
**Post date:** [April 18, 2020, 7:26pm UTC](https://forum.elixirforum.com/t/conditional-rendering-in-liveview-template/30737/4 "2020-04-18T19:26:37Z")

</div>

You shouldn’t to length like this. This will always iterate and count the full list.

Use something like `match?([_|_], @users)` instead.

---

_[View the full topic](https://forum.elixirforum.com/t/conditional-rendering-in-liveview-template/30737)._
