pm9999

pm9999

Web Development with Clojure, Third Edition: missing refer and more page277-278 P1.0

Dmitri Sotnikov @dmitri and Scot Brown @svmbrown

On page 277 image-uploader needs to be referred to from components

;;…
[:div.field
[:div.control
[image-uploader
#(rf/dispatch [:message/save-media %])
“Insert an Image”]]]
;;…

On page 278 I sense that we are only trying to update the code of submit button not the whole message-form as shown:

(defn message-form
[:div.card
[:div.card-header>p.card-header-title
“Post Something!”]
(let [{:keys [login profile]} @(rf/subscribe [:auth/user])
display-name (:display-name profile login)]
[:div.card-content
[:input.button.is-primary.is-fullwidth
{:type :submit
:disabled @(rf/subscribe [:form/validation-errors?])
:on-click #(rf/dispatch [:message/send!
@(rf/subscribe [:form/fields])
@(rf/subscribe [:message/media])])
:value “comment”}]])])

First Post!

svmbrown

svmbrown

Author of Web Development with Clojure

Hi, that seems to be an issue with the code snippet generation.

Please see the source code for the full message-form body here.

I’ll see what I can do about getting an update published as soon as possible.

In case you’re unable to see the content of the link, the form control we wrote to insert an image should be included inside the :div.card-content element of message-form, along with the :div.field that contains the textarea-input from guestbook.components.

Apologies for the confusing error. Thanks for bringing it to our attention.

FYI: In the PDF version of the book, the filenames above the code blocks are clickable, and will let you view the entire namespace they are taken from.

Where Next?

Popular Pragmatic Bookshelf topics Top

kuroneko
Whilst the author has been careful to provide exact results for the tests elsewhere in the book (such as surds with the transformation te...
New
brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
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...
New
AleksandrKudashkin
On the page xv there is an instruction to run bin/setup from the main folder. I downloaded the source code today (12/03/21) and can’t see...
New
leba0495
Hello! Thanks for the great book. I was attempting the Trie (chap 17) exercises and for number 4 the solution provided for the autocorre...
New
New
dsmith42
Hey there, I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>...
New
mert
AWDWR 7, page 152, page 153: Hello everyone, I’m a little bit lost on the hotwire part. I didn’t fully understand it. On page 152 @rub...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New
ggerico
I got this error when executing the plot files on macOS Ventura 13.0.1 with Python 3.10.8 and matplotlib 3.6.1: programming_ML/code/03_...
New

Other popular topics Top

AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New

Sub Categories: