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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>So, out of curiosity, I generated another Phoenix project, with <code>mix phx.new project</code> and the results are unfortunately same <img src="https://forum.elixirforum.com/images/emoji/apple/frowning.png?v=15" title=":frowning:" class="emoji" alt=":frowning:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287490" 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/programming-phoenix-liveview-book-club/55604/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-287490" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287490"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="287502" data-post-id="287502">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Today is being such a hectic day! I still didn’t get the time to try out the chapter. But looking at your code, what is Routes? I don’t see any Routes being aliases on pento_web.ex? Maybe they changed it on 1.7 and you might wanna try the new way of patching? Like <a href="https://hexdocs.pm/phoenix_live_view/live-navigation.html" rel="noopener nofollow ugc">mentioned here</a>?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287502" 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/programming-phoenix-liveview-book-club/55604/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-287502" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287502"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="287533" data-post-id="287533">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thats strange, this is the repo you are using right? <a href="https://github.com/m4hi2/pento" rel="noopener nofollow ugc">https://github.com/m4hi2/pento</a><br>
Just cloned it and it worked fined (after setting the DB_USER and DB_PASS env vars)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287533" 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/programming-phoenix-liveview-book-club/55604/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-287533" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287533"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="287589" data-post-id="287589">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi everyone! Very excited to be part of this bookclub <img src="https://forum.elixirforum.com/images/emoji/apple/heart.png?v=15" title=":heart:" class="emoji" alt=":heart:" loading="lazy" width="20" height="20"></p>
<p>This will be <strong>special</strong> to me since I currently work as a javascript/frontend developer, writing React applications for the past few years, but I listened about Elixir years ago and the language together with the Erlang VM changed my brain forever hehe <img src="https://forum.elixirforum.com/images/emoji/apple/sparkles.png?v=15" title=":sparkles:" class="emoji" alt=":sparkles:" loading="lazy" width="20" height="20"></p>
<p>I’m genuinely very, very interested to see what possibilities LiveView brings to us to write rich clients (SPA-like) but cohesive applications using one language and one framework, for both the backend and frontend.</p>
<p>I did not start to read the book yet but I’ll this week <img src="https://forum.elixirforum.com/images/emoji/apple/victory_hand.png?v=15" title=":victory_hand:" class="emoji" alt=":victory_hand:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287589" 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/programming-phoenix-liveview-book-club/55604/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-287589" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287589"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="287615" data-post-id="287615">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><s>so, if you visit here: <a href="https://github.com/phoenixframework/phoenix_live_view/blob/main/lib/phoenix_live_view/helpers.ex" class="inline-onebox" rel="noopener nofollow ugc">phoenix_live_view/lib/phoenix_live_view/helpers.ex at main · phoenixframework/phoenix_live_view · GitHub</a> you’ll see that <code>live_path</code> no longer exists in <code>0.18</code>. Which is why you were getting that error. Instead,</s> you can go to <code>pento_web.ex</code> and set <code>use Phoenix.Router, helpers: true</code>, followed by using <code>wrong_live</code> instead of <code>live_path</code>. Like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;%= if @over do %&gt;
  &lt;%= live_redirect to: Routes.wrong_path(@socket, :guess) do %&gt;
    &lt;button&gt;Try again!&lt;/button&gt;
  &lt;% end %&gt;
&lt;% end %&gt;
</code></pre>
<p>or something like that. Or you could just use the new way and do a</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;%= if @over do %&gt;
  &lt;.link href={~p"/guess"}&gt;Try Again&lt;/.link&gt;
&lt;% end %&gt;
</code></pre>
<p>instead.</p>
<p>EDIT: Got to check out why <code>live_path</code> wasn’t working though. I get the same error as you btw. However, I’d prefer using compiled routes and <code>.link</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287615" 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/programming-phoenix-liveview-book-club/55604/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-287615" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287615"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="287618" data-post-id="287618">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This is strange indeed. Specially since <a class="mention" href="/u/code-shoily" rel="nofollow">@code-shoily</a> is also facing the same error. I think it’s time to compare Elixir version.</p>
<p>Here’s mine:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Erlang/OTP 25 [erts-13.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]

Elixir 1.14.3 (compiled with Erlang/OTP 25)
</code></pre>
<p>I’ve tried this code in both macOS and Ubuntu 20.04.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287618" 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/programming-phoenix-liveview-book-club/55604/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-287618" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287618"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="287619" data-post-id="287619">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>They are running it off your repo so it’s likely their deps are same (unless you didn’t commit lock file). And I don’t think Elixir or Erlang version has anything to do with it <img src="https://forum.elixirforum.com/images/emoji/apple/person_shrugging.png?v=15" title=":person_shrugging:" class="emoji" alt=":person_shrugging:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287619" 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/programming-phoenix-liveview-book-club/55604/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-287619" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287619"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="287620" data-post-id="287620">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>True. I did commit the lock file. Then it’s more strange that <a class="mention" href="/u/cpgo" rel="nofollow">@cpgo</a> is not getting the error, but both me and you are getting it <img src="https://forum.elixirforum.com/images/emoji/apple/frowning.png?v=15" title=":frowning:" class="emoji" alt=":frowning:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287620" 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/programming-phoenix-liveview-book-club/55604/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-287620" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287620"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="287665" data-post-id="287665">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just started today reading the book! <img src="https://forum.elixirforum.com/images/emoji/apple/tada.png?v=15" title=":tada:" class="emoji" alt=":tada:" loading="lazy" width="20" height="20"></p>
<p>I’ll share my <strong>learning strategy</strong> so maybe it can be useful to someone.</p>
<p>It consists of 4 steps:</p>
<ol>
<li>Read/watch the resource</li>
<li>Copy the resource</li>
<li>Transform the resource</li>
<li>Build a project to validate and consolidate what I learned</li>
</ol>
<p><strong>1 - Read/watch</strong><br>
In this step, I consume the resource “passively”, without coding.</p>
<p>If I found the content not so good in this first step, I finish there and do not go to the next steps…</p>
<p><strong>2 - Copy the resource</strong><br>
In this step, I copy the content (code) in the exact way the author of the book/course created it. Do not fight with the content. It also prevents you to make a small variation that later will become incompatible with the previous work.</p>
<p><strong>3 - Transform the resource</strong><br>
In this step, I consume the resource again, but now creating a new project that is similar to the one taught. This will force your mind a bit but not too much…</p>
<p>E.g: the book taught you to create a to-do list, so in this step, you will create a book management system, something slightly more difficult.</p>
<p><strong>4 - Build a project to validate and consolidate what I learned</strong><br>
In this final step, you should think about a new project that will use what you learned and maybe add some additional features to go beyond a little more to push your knowledge a little more and help you internalize better what you studied.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="287665" data-batch-url="/posts/batch_likers">
                        7
                      </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/programming-phoenix-liveview-book-club/55604/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-287665" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287665"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="287720" data-post-id="287720">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hey, I just realized that I totally missed the point of your previous messages.<br>
I was just cloning your repo and visiting <code>/guess</code> thats why I was under the impression that everything was fine.</p>
<p>About the <code>live_patch</code> error, I’m also no sure about that, but using the new <code>link</code> component seems to work just fine.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def render(assigns) do
    ~H"""
    &lt;h1&gt;Your score: &lt;%= @score %&gt;&lt;/h1&gt;
    &lt;h2&gt;
      &lt;%= @message %&gt; It's &lt;%= @time %&gt;
    &lt;/h2&gt;
    &lt;h2&gt;
      &lt;%= for n &lt;- 1..10 do %&gt;
        &lt;.link href="#" phx-click="guess" phx-value-number={n}&gt;
          &lt;%= n %&gt;
        &lt;/.link&gt;
      &lt;% end %&gt;
    &lt;/h2&gt;
    &lt;%= if @over do %&gt;
      &lt;.link patch={~p"/guess"}&gt;Try again&lt;/.link&gt;
    &lt;% end %&gt;
    """
  end

  def handle_params(_params, _uri, socket) do
    socket = assign(socket, score: 0,
    time: time(),
    message: "Make a guess:",
    secret_number: generate_a_random_number(),
    over: false)

    {:noreply, socket}
  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="287720" 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/programming-phoenix-liveview-book-club/55604/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-287720" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="287720"
                     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 #20"></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/55604/load_more?page=3">Load more posts (51 remaining)</a>
</div></template></turbo-stream>