
pm9999
Web Development with Clojure, Third Edition: "[:<> ...]" syntax in hiccup? Page 241 P1.0
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
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.
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /centos
- /ash
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /sublime-text
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /c
- /slackware
- /julia
- /neovim