Hello everyone. I have not started reading yet. Got the flu ā¦ Will do from the weekend if I fully recover by then
This is the plan I have regarding how Iāll proceed with the reading
Will have a summary of a chapter once done, focusing on my thoughts, learnings and feeling about what I learned.
Since I am treating this as part of mg deep dive into LV, I will dig elsewhere in the web on topics related to the chapters I just read (i.e related articles, discussions, tutorials) so we can dive deeper and have good supplement per chapter
Aside from the āPentoā app mentioned in the book, I will create a Playground like LV app where I will post snippets and share with yāall. Any aha moment Ot discoveries would be codified as snippets
Thatās it. Also a reminder that there is an errata page on DevTalk and if you find any bugs or outdated information you know where to report and help the author.
I am looking forward to learning with you all. LiveView is a tech stack close to my heart and I am super excited to colearn it and brush up and strengthen my skills.
Hi allā¦ Iāve made my way through to the āyour turnā section where the reader is invited to complete the game. While the book has been relatively accessible to a :noob like myself, generating my own code feels like a step beyond my sphere of confidence. If anyone feels like sharing code or tips, youād have an audience of at least me
There are no hard or fast rules IvƔn, tho we generally encourage people to post at least one update per chapter, and welcome others to join in with the conversation when they encounter anything of interest
Check out our latest book clubs here: bookclubs and here are our older ones book-club
Are you stuck where the author asks you to complete the code so that the time updateswith each event trigger? If so, then in your mount/3 function add the time key with valuetime() like score and message. Then, inside the template, use @time instead oftime(). Update the handle_event/3 func as well, doing the same as message and score for time.
Hope that helps.
Please Note: I intentionally left the instructions a little vague, so that you have some room to explore.
Sorry, just noticed there is a separate Your Turn section.
Did you generated a fresh phoenix project?
Just copied you wrong_live.ex and ran it on my project and it worked fine
Edit: I forgot to mention that I already completed a few chapters, I think I skipped ahead a bit because I was curious on how to implement JS interop
Really liking it so far, but I wish it was possible to embed a LiveView on an existing āDeadViewā to make it possible to slowly port some features to LiveView, maybe thats possible but I cant find a exact answer to this.
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 mentioned here?
Hi everyone! Very excited to be part of this bookclub
This will be special 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
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.
I did not start to read the book yet but Iāll this week
so, if you visit here: phoenix_live_view/helpers.ex at main Ā· phoenixframework/phoenix_live_view Ā· GitHub youāll see that live_path no longer exists in 0.18. Which is why you were getting that error. Instead, you can go to pento_web.ex and set use Phoenix.Router, helpers: true, followed by using wrong_live instead of live_path. Like this:
<%= if @over do %>
<%= live_redirect to: Routes.wrong_path(@socket, :guess) do %>
<button>Try again!</button>
<% end %>
<% end %>
or something like that. Or you could just use the new way and do a
<%= if @over do %>
<.link href={~p"/guess"}>Try Again</.link>
<% end %>
instead.
EDIT: Got to check out why live_path wasnāt working though. I get the same error as you btw. However, Iād prefer using compiled routes and .link.
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
Iāll share my learning strategy so maybe it can be useful to someone.
It consists of 4 steps:
Read/watch the resource
Copy the resource
Transform the resource
Build a project to validate and consolidate what I learned
1 - Read/watch
In this step, I consume the resource āpassivelyā, without coding.
If I found the content not so good in this first step, I finish there and do not go to the next stepsā¦
2 - Copy the resource
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.
3 - Transform the resource
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ā¦
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.
4 - Build a project to validate and consolidate what I learned
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.