<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="375765" data-post-id="375765">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sodapopcan" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sodapopcan/120/34668_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sodapopcan
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For the me the main issue with dedicated heex files is that for function components you end up with attributes and function head in one file, and the template in another.  But It’s those things that I want together!  Otherwise, with 90% of my LiveViews not fitting on one screen, the editor splitting argument is moot because I’m going to end up splitting the same file so I can see different part of it at the same time (this isn’t something I personally like doing but I know many do).  The other problem is that if there are a lot of little private function components extracted (which is a practice I do not like but many don’t agree), it would be a pain to have to hop through several tiny template files as opposed to being able to scroll through them.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375765" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/42">Post #41</a>
	                </div>
	            </div>
              <div id="likers-container-375765" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375765"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #41"></div>
  </section>
</div>
    <div class="postbit" id="375771" data-post-id="375771">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="nikfp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nikfp/120/37207_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  nikfp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I can see your point. I struggle with picking relevant context out of a lot of noise though, and when it’s all one big ball of markup that’s what happens to me. Playing “find the assign I’m looking for” has taken a lot of time away from me.  Dividing it up helps me but YMMV.</p>
<p>As for <em>where</em> to divide it, I’ve found that splitting based on assigns is about right. If I have to prop drill an assign down through multiple components it’s a code smell to me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375771" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-375771" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375771"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #42"></div>
  </section>
</div>
    <div class="postbit" id="375779" data-post-id="375779">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cmo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cmo/120/19618_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cmo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I often set assigns inside <code>render</code> before the sigil, so I moved most of my .sface and .heex to be in the godfile.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375779" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-375779" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375779"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #43"></div>
  </section>
</div>
    <div class="postbit" id="375887" data-post-id="375887">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="the_wildgoose" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  the_wildgoose
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I also significantly prefer surface over HEEx, however, it seems like it’s now on lifesupport, so I hesitate to use it for new projects?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375887" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-375887" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375887"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #44"></div>
  </section>
</div>
    <div class="postbit" id="375888" data-post-id="375888">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="derek-zhou" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/derek-zhou/120/19943_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  derek-zhou
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I won’t say Surface is on life support. It is a stable and solid library which does not need constant update. I only wish author can release 1.0 to reduce the hesitation of adoption. Besides the prettier syntax, it also offers hook organization and scoped css support, both are very nice.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="375888" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/46">Post #45</a>
	                </div>
	            </div>
              <div id="likers-container-375888" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="375888"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #45"></div>
  </section>
</div>
    <div class="postbit" id="376012" data-post-id="376012">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="evnp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/evnp/120/37736_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  evnp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Off original topic, but with all the discussion about JSX and DSLs vs string-based templating systems, I’m curious. Anyone using <a href="https://github.com/mhanberg/temple" class="inline-onebox" rel="noopener nofollow ugc">GitHub - mhanberg/temple: An HTML DSL for Elixir and Phoenix · GitHub</a> ?</p>
<p>With Elixir’s macro system we already have the ability, without any extra tooling/compilers, to create a more beautiful/readable/expressive DSL than React devs could ever dream of (disclaimer: I am a begrudging React user but also a longtime enjoyer of JSX, for many of the reasons already stated more eloquently than I could, above).</p>
<p>To me this is such a clear demonstration of the power of the language, and it’s been really eye-opening as an experiment. I personally have yet to write production code with Temple, curious if anyone else has experiences to share.</p>
<p>Translating the example from above:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def my_component(%{error_message: error_message, count: count}) do
  temple do
    if error_message do
      div do: error_message
    else
      count = (count * 2) - 1
      case count do
        0 -&gt; div do: "No count!"
        n -&gt; ol do
          for index &lt;- 1..n do
            li do: index
          end
        end
      end
    end
  end
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376012" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/47">Post #46</a>
	                </div>
	            </div>
              <div id="likers-container-376012" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376012"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #46"></div>
  </section>
</div>
    <div class="postbit" id="376021" data-post-id="376021">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Temple is neat but fundamentally it is still being used as a templating language, albeit a better one. This isn’t really its fault; it has to work with Phoenix. To get the full benefit you would really want to redesign LiveView’s engine.</p>
<p>Some may not realize this, but React’s engine does not work with HTML at all. The VDOM, nodes, and diffs are all encoded directly into the execution structure as it evaluates the application code. The structure mimics the DOM structure and the tree “matches up” during the diff. They essentially conceptually bypassed HTML completely, which is really the only sane thing to do. The DOM structure is still there, but there is no Markup or Language.</p>
<p>You can see this come up in one of my favorite “mistakes” in Phoenix: LiveComponents need a root node in the template. Why?</p>
<p>Look at these React components:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">function GenericPost({children}) {
  return &lt;div&gt;{children}&lt;/div&gt;
}
function SpecialPost({content}) {
  return &lt;GenericPost&gt;{content}&lt;/GenericPost&gt;
}
</code></pre>
<p>The app tree is:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;SpecialPost&gt;
  &lt;GenericPost&gt;
    &lt;div&gt;whatever&lt;/div&gt;
  &lt;/GenericPost&gt;
&lt;/SpecialPost&gt;
</code></pre>
<p>But the DOM tree is only:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;div&gt;whatever&lt;/div&gt;
</code></pre>
<p>LiveView fails to handle this case, which is problematic because it comes up a lot when you try to compose components. The extra <code>div</code>s you have to insert mess up layout (like CSS grid containers). This is a real problem I’ve had to deal with; it’s not purely academic.</p>
<p>React is able to cope with this because there is no template at all, anywhere. The diffing algorithm is bespoke and understands that a parent can exist with no corresponding DOM node.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376021" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/48">Post #47</a>
	                </div>
	            </div>
              <div id="likers-container-376021" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376021"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #47"></div>
  </section>
</div>
    <div class="postbit" id="376048" data-post-id="376048">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bartblast" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/120/17647_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bartblast
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Hologram</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Since Hologram got mentioned a few times here (<a class="mention" href="/u/eiji" rel="nofollow">@Eiji</a>, <a class="mention" href="/u/jam" rel="nofollow">@jam</a>), figured I’d chime in – not directly on the original question about template organization, but on the JSX vs templates discussion that emerged, specifically how it relates to Hologram’s design.</p>
<p>The usual JSX argument is expressiveness, right? Being able to freely mix logic and markup. And that’s genuinely powerful for complex conditional logic and heavy data transformation – though whether those should be in the view is another question. But I found that leveraging Elixir’s pattern matching for view variants gives you a different kind of expressiveness that’s really clean.</p>
<p>Let me show what I mean using (slightly simplified) <a class="mention" href="/u/garrison" rel="nofollow">@garrison</a>’s example:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def my_component(%{error_message: error_message, count: count}) do
  zero_message = &lt;div&gt;No count!&lt;/div&gt;

  if error_message do
    &lt;div&gt;{error_message}&lt;/div&gt;
  else
    case count do
      0 -&gt; zero_message
      n -&gt; &lt;ol&gt;{for i &lt;- n, do: &lt;li&gt;{i}&lt;/li&gt;}&lt;/ol&gt;
    end
  end
end
</code></pre>
<p>Hologram with pattern matched partials (coming soon):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def my_component(%{error_message: nil, count: 0}) do
  ~HOLO"&lt;div&gt;No count!&lt;/div&gt;"
end

def my_component(%{error_message: nil, count: count}) do
  ~HOLO"""
  &lt;ol&gt;
    {%for i &lt;- count}
      &lt;li&gt;{i}&lt;/li&gt;
    {/for}
  &lt;/ol&gt;
  """
end

def my_component(%{error_message: error_message}) do
  ~HOLO"&lt;div&gt;{error_message}&lt;/div&gt;"
end
</code></pre>
<p>Now, readability is subjective – I know JSX fans prefer “it’s just code” precisely because there’s no special syntax. But to me, this pattern-matching approach leverages what Elixir is really good at. The template acts as guardrails that naturally push you toward separating concerns, and each variant’s structure is immediately visible. This gets even cleaner when you add computed properties into the mix – derived values stay declarative and outside the template.</p>
<p>You could achieve similar separation in JSX by extracting functions, but it wouldn’t be quite as idiomatic or concise. This is one area where Elixir genuinely has an edge that JavaScript doesn’t.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376048" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/49">Post #48</a>
	                </div>
	            </div>
              <div id="likers-container-376048" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376048"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #48"></div>
  </section>
</div>
    <div class="postbit" id="376049" data-post-id="376049">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bartblast" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/120/17647_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bartblast
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Hologram</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Another reason I went with templates is how they work in Hologram – they compile to data structures, not strings. This makes them fundamentally different from traditional template systems like EEx or ERB.</p>
<p>When I was starting work on Hologram, one of the big design decisions was templates vs a JSX-style approach. I ended up choosing templates – but not traditional string-based templates. Something different that I think sits in an interesting middle ground.</p>
<p>When you write this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">~HOLO"""
&lt;div&gt;
  &lt;span&gt;{@foo}&lt;/span&gt;
  {%for i &lt;- @items}&lt;span&gt;{i}&lt;/span&gt;{/for}
&lt;/div&gt;
"""
</code></pre>
<p>It compiles to something like:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">fn vars -&gt;
  [
    {:element, "div", [],
     [
       {:text, "\\n  "},
       {:element, "span", [], [expression: {vars.foo}]},
       for i &lt;- vars.items, do: {:element, "span", [], [expression: {i}]},
       {:text, "\\n"}
     ]}
  ]
end
</code></pre>
<p>This is basically what <a class="mention" href="/u/derek-zhou" rel="nofollow">@derek-zhou</a> showed earlier – it’s closer to Clojure’s Hiccup than traditional templates. Because they compile to tuples, there’s potential to support both approaches. For example, when you need full expressiveness, you could drop down to raw tuples like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def my_component(%{count: 0}) do
  {:div, "No count!"}
end
</code></pre>
<p>This isn’t implemented yet, but it’s planned. The template syntax gives you readability in the common case, while the data structure approach keeps the door open for direct tuple manipulation when needed, alternative template systems that compile to the same representation, and interesting possibilities for tooling.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376049" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/50">Post #49</a>
	                </div>
	            </div>
              <div id="likers-container-376049" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376049"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #49"></div>
  </section>
</div>
    <div class="postbit" id="376050" data-post-id="376050">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="bartblast" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/bartblast/120/17647_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  bartblast
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Hologram</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>There’s also another interesting aspect of templates that compile to data: the potential for compile-time validation of HTML semantics.</p>
<p>Compare these two approaches:</p>
<p>Hologram:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[{:element, "div", [], [...]}]
</code></pre>
<p>JSX:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">React.createElement('div', null, ...)
</code></pre>
<p>JSX represents HTML as function calls that execute to produce elements. This means the HTML structure only exists at runtime - the compiler just sees function calls. Even with static analysis tools like TypeScript or ESLint, certain validations aren’t possible:</p>
<ul>
<li>Block vs inline rules: <code>&lt;p&gt;&lt;div&gt;&lt;/div&gt;&lt;/p&gt;</code></li>
<li>Required parent elements: <code>&lt;li&gt;</code> outside <code>&lt;ul&gt;</code>, <code>&lt;tr&gt;</code> outside <code>&lt;table&gt;</code></li>
<li>Disallowed interactive nesting: nested <code>&lt;button&gt;</code> or <code>&lt;a&gt;</code> elements</li>
</ul>
<p>Yes, TypeScript can catch prop type errors and invalid attributes for specific components, but it can’t validate HTML semantic structure. The issue isn’t insufficient tooling - it’s that the structure is implicit in the runtime execution rather than explicit in the code.</p>
<p>Hologram templates compile to data structures that explicitly represent HTML structure, so the compiler can validate these structural and semantic rules at compile time. It can see “this is a p element containing a div element” and validate against HTML rules before any code runs.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="376050" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/h-sigil-everywhere-vs-heex-files-any-real-world-experience/72879/51">Post #50</a>
	                </div>
	            </div>
              <div id="likers-container-376050" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="376050"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #50"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/72879/load_more?page=6">Load more posts (5 remaining)</a>
</div></template></turbo-stream>