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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>To someone who doesn’t understand these concepts, I think it’s far more likely that they would assume that “dead views” are the way to do this, and would not intuit this approach. Perhaps a guide? “Rendering Liveviews without connecting the socket” or something similar?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="357986" 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/liveview-feature-to-cancel-second-render/67770/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-357986" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="357986"
                     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 #21"></div>
  </section>
</div>
    <div class="postbit" id="357990" data-post-id="357990">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="benwilson512" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/benwilson512/120/1457_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  benwilson512
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Craft GraphQL APIs in Elixir with Absinthe</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am inclined to agree. On the one hand this isn’t hard to wire in from a “line of code” standpoint. And at the same time it does require touching code that, since it’s generated, people almost never look at, and aren’t always comfortable touching. This feels like a simple <code>|&gt; no_live</code> helper in Phoenix that is then easy to document and see.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="357990" data-batch-url="/posts/batch_likers">
                        3
                      </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/liveview-feature-to-cancel-second-render/67770/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-357990" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="357990"
                     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 #22"></div>
  </section>
</div>
    <div class="postbit" id="358031" data-post-id="358031">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is exactly why I suggested introducing two entirely new top level functions. Mount currently gets called twice once for dead render and once for live. Have a load function for dead render and live function for the connection load. Don’t want to connect as live view and stay dead? Don’t provide a live function. Perhaps behind the scenes that gets compiled down to the current mount with a check for if the socket is connected or not.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358031" data-batch-url="/posts/batch_likers">
                        2
                      </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/liveview-feature-to-cancel-second-render/67770/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-358031" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358031"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="358049" data-post-id="358049">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="steffend" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/steffend/120/20548_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  steffend
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Phoenix Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a href="https://github.com/phoenixframework/phoenix_live_view/pull/3704" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/phoenixframework/phoenix_live_view/pull/3704</a></p>
<p>This PR introduces a new mount option called <code>auto_connect</code>. By default, it is true, which means that the LiveView JS will automatically connect to the server on dead render. If false, the connection will be skipped. The important difference compared to a <code>no_live(socket)</code> approach is that it does not suggest in any way that we should not connect when navigating from another LiveView when already connected.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358049" data-batch-url="/posts/batch_likers">
                        8
                      </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/liveview-feature-to-cancel-second-render/67770/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-358049" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358049"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="358055" data-post-id="358055">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Could it be that the problem is Controller+Template is less convenient than a single file LiveView?</p>
<p>And, in particular, that it could be easier to go from a static/dead page to a LiveView by changing only a few things like route definition and perhaps a top level <code>use</code> invocation in the controller to turn it into a LiveView? In addition to being able to colocate controller and template like in a LiveView.</p>
<p>I feel I can understand the wish to “default to LiveView for everything”, as I’m doing the same and writing a controller feels awkward.</p>
<p>But I also feel adding more modes to the LiveView lifecycle is going to make reasoning and creating a mental model of it even harder.</p>
<p>The original idea was to turn off the connected render. That affects existing patterns like deferring actions to the connected render, async assigns, pubsub subscriptions, etc.</p>
<p>Steffen proposed <code>auto_connect: false</code> with different semantics. IIUC that feature would create situations like a supposedly static page behaves differently if you load it via regular HTTP request or if you live navigate into it. Presumably, regular request would leave you in a disconnected state but live navigation would stay connected, changing the behavior of <code>&lt;.link&gt;</code>, for example.</p>
<p>So in one such LiveView’s that opted into <code>auto_connect: false</code>, <code>mount</code> would be called in either a connected or disconnected state. I think that requires a developer to understand all the nuances of the original lifecycle, plus this new mode, which is a net negative for me.</p>
<p>I think I’d rather revisit Controllers and see if working with them can be made more like the LiveView authoring experience.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358055" 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/liveview-feature-to-cancel-second-render/67770/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-358055" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358055"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="358061" data-post-id="358061">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="steffend" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/steffend/120/20548_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  steffend
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Phoenix Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="rhcarvalho" data-post="26" data-topic="67770">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rhcarvalho/48/32243_2.png" class="avatar"> rhcarvalho:</div>
<blockquote>
<p>IIUC that feature would create situations like a supposedly static page behaves differently if you load it via regular HTTP request or if you live navigate into it.</p>
</blockquote>
</aside>
<p>Yes, but if the page actually uses any live features, you shouldn’t use <code>auto_connect: false</code>.</p>
<aside class="quote no-group" data-username="rhcarvalho" data-post="26" data-topic="67770">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rhcarvalho/48/32243_2.png" class="avatar"> rhcarvalho:</div>
<blockquote>
<p>Could it be that the problem is Controller+Template is less convenient than a single file LiveView?</p>
</blockquote>
</aside>
<p>This came across my mind as well. Maybe what people actually want is a</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyAppWeb.DeadView do
  use Phoenix.DeadView

  def mount(params, session, conn) do
    conn
    |&gt; assign(...)
    |&gt; then(&amp;{:ok, &amp;1})
  end

  def render(assigns) do
    ~H"""
    ...
    """
  end
end
</code></pre>
<p>although <code>mount</code> might not be the correct terminology here. Then, to switch to a LiveView you “just” switch out the conn for a socket and replace <code>use Phoenix.DeadView</code> with <code>use Phoenix.LiveView</code>.</p>
<p>One drawback compared to <code>auto_connect</code> is that if you navigate to this page from a LiveView, the existing connection cannot be used and a regular request is performed instead.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358061" 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/liveview-feature-to-cancel-second-render/67770/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-358061" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358061"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="358068" data-post-id="358068">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Phoenix-Core-Team" data-username="steffend" data-post="27" data-topic="67770">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/steffend/48/20548_2.png" class="avatar"> steffend:</div>
<blockquote>
<p>Yes, but if the page actually uses any live features, you shouldn’t use <code>auto_connect: false</code>.</p>
</blockquote>
</aside>
<p>I agree.</p>
<p>There’s an argument in recent messages that we’re adding this explicit feature for people who don’t understand every aspect of LiveView. That it would be hard for them to figure out they can simply change <code>app.js</code> to connect conditionally.</p>
<p>If I mentalize that persona, I suspect they might have a hard time deciding what they can or cannot do in a LiveView when they use <code>auto_connect: false</code>.</p>
<aside class="quote group-Phoenix-Core-Team" data-username="steffend" data-post="27" data-topic="67770">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/steffend/48/20548_2.png" class="avatar"> steffend:</div>
<blockquote>
<p>Maybe what people actually want is a</p>
</blockquote>
</aside>
<p>You captured what I meant well. On the router side, we would not say <code>live SomeModule</code>, but instead <code>get/post/...</code> so that we can handle only certain HTTP verbs, or a more generic catch all.</p>
<p>Maybe instead of <code>mount/3</code> the callback would be HTTP-verb related?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358068" 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/liveview-feature-to-cancel-second-render/67770/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-358068" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358068"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="358074" data-post-id="358074">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think the important bit is the breadcrumb. People own’t understand everything, but if they search in the docs for the word “static page” and get linked to this option, the docs for this option can explain when it can and when it can’t be used etc.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358074" 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/liveview-feature-to-cancel-second-render/67770/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-358074" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358074"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="358076" data-post-id="358076">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>But I do agree, I think that it the docs for this might deserve its own section with an explanation of the kinds of things you <em>can’t</em> do w/ it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358076" 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/liveview-feature-to-cancel-second-render/67770/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-358076" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358076"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="358083" data-post-id="358083">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="rhcarvalho" data-post="26" data-topic="67770">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rhcarvalho/48/32243_2.png" class="avatar"> rhcarvalho:</div>
<blockquote>
<p>I feel I can understand the wish to “default to LiveView for everything”, as I’m doing the same and writing a controller feels awkward.</p>
</blockquote>
</aside>
<p>I went to look at some code I wrote some months ago that fell into this category. To my own surprise, turns out I defined two modules in a single file to be able to colocate controller and template!</p>
<p>I understand controllers are a bit more complicated than LiveViews in this regard because they expose more flexibility, both in targeting different HTTP verbs and rendering different types of content from the same endpoint (HTML/JSON/etc).</p>
<p>Here’s a gist of the code I wrote, <code>lib/myapp_web/controllers/temp_controller.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyAppWeb.TempController do
  use MyAppWeb, :controller

  def show(conn, %{"id" =&gt; id} = _params) do
    # ...
    render(conn, :show, id: id)
  end
end

defmodule MyAppWeb.TempHTML do
  use MyAppWeb, :html

  attr :id, :integer, required: true

  def show(assigns) do
    ~H"""
    {{ @id }}
    """
  end
end
</code></pre>
<p>router.ex:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    # ...

    get "/temp", TempController, :show
</code></pre>
<p>In my understanding I wouldn’t want to change anything in the router side. I could have a single controller and choose which function to call based on HTTP verb:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    get "/temp", TempController, :show
    post "/temp", TempController, :save
</code></pre>
<p>On the controller, there’s a difference compared to <code>mount/3</code> in that there are 2 arguments, <code>conn</code> and <code>params</code> – no <code>session</code>. I think that’s okay.</p>
<p>When I call <code>render</code>, IIRC the expectation is that there’s a module with a name similar to the controller <code>TempController</code> → <code>TempHTML</code>, then I get to choose the template name which would typically be a file in disk. This part could be simplified, if I could write the template in the same module as the controller just like in LiveView.</p>
<p>Perhaps that could be done without changing Phoenix or LiveView, and instead updating the <code>phx.new</code> generator to make <code>use MyAppWeb, :controller</code> do some magic that “transforms a function returning HEEx in the controller module into a valid template”?</p>
<p><a class="mention" href="/u/zachdaniel" rel="nofollow">@zachdaniel</a> does this resonate with your own needs?</p>
<hr>
<p>I’ve also found a case where I deliberately made a static help page into a LiveView so that I can live navigate into and from it. If I would turn off the LiveSocket in this page, I would lose live navigation out of the page.</p>
<p>It also has the advantage that when I update the docs users immediately get to see the updated page without having to refresh.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="358083" 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/liveview-feature-to-cancel-second-render/67770/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-358083" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="358083"
                     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 #30"></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/67770/load_more?page=4">Load more posts (12 remaining)</a>
</div></template></turbo-stream>