pm9999

pm9999

Web Development with Clojure, Third Edition: "[:<> ...]" syntax in hiccup? Page 241 P1.0

@Dmitri @svmbrown

Does the syntax work on your machines somehow it’s giving me error?

when calling lifecycle function guestbook.core/mount-components Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in.

Marked As Solved

svmbrown

svmbrown

Author of Web Development with Clojure

We did use react 17 and react-dom 17. It’s possible that there were warnings, but we didn’t encounter any errors.

the reason that you’re encountering the issue is because fragments (the react feature behind reagent’s :<>) was introduced in 16.2.0, so it isn’t present in 16.0.0. If 17.0.1 works despite the warnings, I’d recommend using it. The warnings are coming from react-highlight having out-of-date react dependencies. This is not worrying because react-highlight is only being used for re-frame-10x, and so it doesn’t have any impact on application functionality.

Warnings from NPM like these are common, and can often be resolved or reduced by trimming any unnecessary declared dependencies, and installing the most recent compatible version of any packages that shadow-cljs notices are missing.

If 17.0.1 (version we used) or 17.0.2 (most recent version) don’t work for you, try 16.14.0 (relatively recent version of react 16) instead of going all the way back to 16.0.0.

Where Next?

Popular Pragmatic Bookshelf topics Top

New
GilWright
Working through the steps (checking that the Info,plist matches exactly), run the demo game and what appears is grey but does not fill th...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |&gt; handle_event() |&gt; render() but the correc...
New
HarryDeveloper
Hi @venkats, It has been mentioned in the description of ‘Supervisory Job’ title that 2 things as mentioned below result in the same eff...
New
New
swlaschin
The book has the same “Problem space/Solution space” diagram on page 18 as is on page 17. The correct Problem/Solution space diagrams ar...
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...
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 “&gt;...
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

Other popular topics Top

Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
New
New
husaindevelop
Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext ...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New

Sub Categories: