enoonan

enoonan

Programming Phoenix LiveView: Mount and Render the Product Index - language suggestion

The book instructs readers to:

Open up lib/pento_web/live/product_live/index.html.heex and add a header that renders the value of the @greeting assignment.​ 

<h1 class=​"text-2xl font-bold"​><​%=​ ​@​greeting ​%​></h1>”

This might just be a me problem, but since it said “add a header” I just kind of unthinkingly put it inside the <.header> component - because at that point in the book I don’t really know what <.header> is.

Since it was then effectively rendering an H1 inside an H1, it resulted in some busted markup. That led me down a whole rabbit hole during which I wondered if Phoenix components themselves were busted and the framework wasn’t so stable after all!

Again - maybe it’s just a me thing, and take it or leave it, but my suggestion would be to change the language to say something more like “add a header that renders the value of the @greeting assignment to the very top of the file.”

0 92 0

Popular Prag Prog topics Top

simonpeter
When I try the command to create a pair of migration files I get an error. user=&gt; (create-migration "guestbook") Execution error (Ill...
5 1779 4
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
22 1618 20
New
jdufour
Hello! On page xix of the preface, it says there is a community forum "… for help if your’re stuck on one of the exercises in this book… ...
3 1137 1
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
1 1105 2
New
New
jskubick
I’m under the impression that when the reader gets to page 136 (“View Data with the Database Inspector”), the code SHOULD be able to buil...
2 1163 8
New
nicoatridge
Hi, I have just acquired Michael Fazio’s “Kotlin and Android Development” to learn about game programming for Android. I have a game in p...
0 7935 6
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
17 1370 9
New
jonmac
The allprojects block listed on page 245 produces the following error when syncing gradle: “org.gradle.api.GradleScriptException: A prob...
1 2193 1
New
mcpierce
@mfazio23 I’ve applied the changes from Chapter 5 of the book and everything builds correctly and runs. But, when I try to start a game,...
0 1149 10
New

Other popular topics Top

ohm
Which, if any, games do you play? On what platform? I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
245 5072 101
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
38 3782 19
New
AstonJ
Or looking forward to? :nerd_face:
480 9107 251
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
227 8356 88
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
212 14614 90
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
14 7501 8
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
34 3628 21
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
190 3595 79
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
155 4122 65
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
37 2493 14
New

Latest in PragProg

View all threads ❯