This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-19
Channels
- # beginners (37)
- # boot (96)
- # cider (23)
- # clara (2)
- # cljs-dev (40)
- # clojars (1)
- # clojure (149)
- # clojure-conj (1)
- # clojure-dev (2)
- # clojure-dusseldorf (5)
- # clojure-france (82)
- # clojure-italy (1)
- # clojure-nlp (1)
- # clojure-russia (13)
- # clojure-spec (24)
- # clojure-uk (62)
- # clojurescript (131)
- # core-async (13)
- # core-logic (7)
- # data-science (1)
- # datomic (10)
- # defnpodcast (3)
- # docker (4)
- # emacs (3)
- # events (4)
- # hoplon (68)
- # klipse (4)
- # leiningen (1)
- # off-topic (5)
- # om (140)
- # onyx (16)
- # pedestal (24)
- # planck (10)
- # proton (2)
- # re-frame (9)
- # reagent (4)
- # remote-jobs (1)
- # ring-swagger (16)
- # untangled (5)
- # vim (8)
- # yada (30)
hi fellow reagent users, i have a short question: i know that in order to properly escape strings in hiccup you need to use hiccup/h (Alias for hiccup.util/escape-html), is this necessary in reagent components as well? As I have understood, reagent provides hiccup- like syntax to create components, not hiccup explicitly.
@dev-hartmann Not sure if this is what you are getting at or not, but here is an example of how to display html: [:div {:dangerouslySetInnerHTML {:__html "<b>I am bold</b>"}}]
@dev-hartmann this also works for entities:
first (:require [goog.string :as gstring])
then [:div "hello" (gstring/unescapeEntities " ") "there"]