title: Does Svelte have render functions or custom template helpers?
body: <p>Svelte ships with things like <a href="https://svelte.dev/docs#if" rel="nofollow noreferrer">#if</a> and <a href="https://svelte.dev/docs#each" rel="nofollow noreferrer">#each</a>. How can the user do arbitrary template logic?</p>
  <p>For example, React and Vue both enable <a href="https://v2.vuejs.org/v2/guide/render-function.html" rel="nofollow noreferrer">using functions</a> to define a UI tree, and Ember has <a href="https://guides.emberjs.com/v3.4.0/tutorial/hbs-helper/" rel="nofollow noreferrer">Handlebars helpers</a>.</p>
  <h2>Update</h2>
  <p>To give a more specific example, how would I implement &quot;every third row should have a dark-gray background unless it contains a photo?&quot;</p>
  <blockquote>
  <p>See <a href="https://stackoverflow.com/questions/61352970/does-svelte-have-render-functions-or-custom-template-helpers?noredirect=1#comment109735455_61352970">this comment</a></p>
  </blockquote>