This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-16
Channels
- # aws-lambda (10)
- # beginners (52)
- # boot (42)
- # cider (2)
- # cljs-dev (8)
- # cljsjs (4)
- # cljsrn (10)
- # clojars (3)
- # clojure (48)
- # clojure-conj (4)
- # clojure-dev (19)
- # clojure-italy (7)
- # clojure-norway (4)
- # clojure-russia (44)
- # clojure-spec (70)
- # clojure-uk (34)
- # clojurescript (39)
- # cursive (35)
- # data-science (11)
- # datomic (7)
- # emacs (6)
- # fulcro (2)
- # hoplon (12)
- # jobs (1)
- # juxt (18)
- # lein-figwheel (2)
- # leiningen (4)
- # luminus (9)
- # off-topic (29)
- # om (46)
- # onyx (131)
- # other-languages (24)
- # parinfer (84)
- # pedestal (10)
- # portkey (45)
- # protorepl (1)
- # re-frame (15)
- # reagent (43)
- # ring-swagger (41)
- # schema (6)
- # shadow-cljs (293)
- # slack-help (2)
- # specter (42)
@roman01la Thanks! sorry for late.
Hi, @roman01la! Does cljss
support all CSS selectors? If so, how to use, shoud I use them quoted in " "
like "ul > li"
and "div.the-class-name.another-class-name"
if I inject them globally?
No, it doesn’t. Everything that’s supported is described in readme
You can do pseudos, but not child and element selectors
what's the advantage of using (r/props) and (r/children) in a render function over accessing them via arguments such as (fn [props & args])
?
Probably none, but they are also accessible on other lifecycle methods, where they might not be passed in as arguments
Probably none, but they are also accessible on other lifecycle methods, where they might not be passed in as arguments
Hello. Is there reagent-friendly version of http://htmltohiccup.herokuapp.com/ ?
which handles :style
etc properly
@andrewboltachev I use that one for reagent all the time
what features are you missing?
@pesterhazy let's say we have
<div style="background-color: red;">111</div>
which becomes [:div {:style "background-color: red;"} "111"]
I got then
Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX. This DOM node was rendered by `myproject.views.main_panel`.
wanna got
[:div {:style {:backgroundColor "red"}} "111"]
would be a cool enhancement
also would be cool to not to add [:html [:body ...]]
around it every time
haha yeah that's pretty redundant
I've once learned that it's a feature of the parser
still it's super handy
here I've tried to compose similar project for early Om https://github.com/andrewboltachev/html2om/blob/master/src/clj/html2om/parser.clj#L4
and got the same html body around IIRC
ok, may be I'll go for it and try to enhance that tool
join the club of htmltohiccups: https://github.com/weavejester/hiccup/wiki/Converting-html-to-hiccup
thanks
And I'm getting a warning "Warning: The same with-let is being used more than once in the same reactive context."
@achikin no sure, but Reagent doesn't always like lazy seqs, so try (do-all (map-indexed
plus I guess you forgot to deref the atoms
@metametadata no, and no 🙂 I've tried doall and all atoms are dereferenced properly.
I mean shouldn't (map-indexed list-item items)
be (map-indexed list-item @items)
?
Btw it was my second question - why sometimes reagent shows warnings when you don't doall
and sometimes not?
@metametadata the code I pasted here is not the actual code, its just a reconstruction, the real code derefs properly.
ok, I see
I can't answer the second question. I put doall when it asks for it 🙂
while we're on the subject, is there any meaningful difference between using (doall (map ...))
and (mapv ...)
since I think mapv should be eager?