This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-24
Channels
- # announcements (13)
- # asami (9)
- # aws (3)
- # babashka (13)
- # babashka-sci-dev (7)
- # beginners (32)
- # calva (59)
- # cider (9)
- # clj-kondo (5)
- # cljsrn (14)
- # clojure (98)
- # clojure-brasil (5)
- # clojure-dev (1)
- # clojure-europe (30)
- # clojure-france (12)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (7)
- # clojurescript (20)
- # conjure (2)
- # datahike (7)
- # datalog (38)
- # datomic (29)
- # events (1)
- # fulcro (72)
- # graalvm (1)
- # gratitude (3)
- # helix (7)
- # honeysql (3)
- # improve-getting-started (2)
- # introduce-yourself (1)
- # leiningen (13)
- # lsp (17)
- # malli (11)
- # meander (8)
- # nextjournal (3)
- # off-topic (5)
- # pathom (2)
- # portal (43)
- # rdf (2)
- # re-frame (8)
- # reagent (7)
- # reitit (1)
- # shadow-cljs (27)
- # spacemacs (31)
- # sql (2)
- # tools-deps (3)
- # vim (1)
- # xtdb (12)
I’m having trouble with the image tag in Reagent. I’m using shadow as my build tool. To use an image in the same folder as my namespace, all I have to do is: [:img {:src “./img.png”}] right? When I do this, in the dev tools it says: GET http://localhost:3449/img 404 (Not Found) Any help is much appreciated.
Well, is the image at the right location on the server? As long as the URL itself is correct, any HTTP 404 error is neither a Reagent problem nor a CLJS one.
> To use an image in the same folder as my namespace
This is not how it will work. Shadow's dev server will load asset files from the public
folder. The above will only render an html lik eos: <img src "./img.png">
so you need to have the correct file in public/<url-path>/img.png
Has anyone attempted to use an iframe tag with reagent and shadow? I've done so and get a compilation failed error with “invalid assignment target” given for the url address
When I was copying code to you, I noticed I had some legacy url import messing things up. All fixed! Thanks for the response.