tma_1

tma_1

Building Table Views with Phoenix LiveView: Starting code

The completed code is available, but is there somewhere to get the initial code for the application?

Marked As Solved

pullrich

pullrich

Author of Building Table Views with Phoenix LiveView

Hey folks, the author here. I’m sorry, I haven’t seen this post until now. If you have urgent matters like this, it’s always better to reach out to me via Twitter or my personal website.

Regarding the issue: The GitHub repo shows the completed code, which is the final result after you followed the book until the end. The intention is that you follow the book’s instructions and write the code yourself step-by-step. The GitHub repo is intended to show you the final result in case you only wanna see that, or to give you some help if you get lost. But feel free to create your own repo and publish the intermediary steps as well :slight_smile:

Best, Peter

Also Liked

rkachowski

rkachowski

I have the same issue, the book refers to code that is seemingly a previous iteration of what is available on github. There’s no direct means of following along with the book as the code referenced doesn’t exist.

e.g.

Open up lib/meow_web/live/meerkat_live.ex, and you’ll see our basic MeerkatLive-LiveView for displaying the meerkat data.

defmodule MeowWeb.MeerkatLive do use MeowWeb, :live_view
  alias Meow.Meerkats
  def mount(_params, _session, socket), do: {:ok, socket}
  def handle_params(_params, _url, socket) do {:noreply, assign_meerkats(socket)}
  end

  defp assign_meerkats(socket) do
    assign(socket, :meerkats, Meerkats.list_meerkats())
  end 

end

The referenced module is actually 85 lines long and doesn’t include an implementation of assign_meerkats as referenced above https://github.com/PJUllrich/pragprog-book-tables/blob/main/lib/meow_web/live/meerkat_live.ex

jmcochran

jmcochran

This problem persists with no apparent attempt to address it by the author. I find that it renders the book nearly useless. Please address this issue.

jmcochran

jmcochran

Hi Peter,

Thanks for the answer. The problem is that the book assumes an existing project to work on. If this is simply an easily generated project it would be nice to have some instructions on generating it.

Popular Prag Prog topics Top

ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
brunogirin
When running tox for the first time, I got the following error: ERROR: InterpreterNotFound: python3.10 I realised that I was running ...
New
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

Other popular topics Top

AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
New

Latest in PragProg

View all threads ❯