This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-17
Channels
- # beginners (45)
- # boot (33)
- # chestnut (9)
- # cider (2)
- # cljs-dev (24)
- # cljsrn (1)
- # clojure (114)
- # clojure-conj (3)
- # clojure-dev (3)
- # clojure-dusseldorf (3)
- # clojure-greece (5)
- # clojure-italy (22)
- # clojure-russia (10)
- # clojure-spec (12)
- # clojure-uk (19)
- # clojurescript (117)
- # core-async (16)
- # cursive (3)
- # data-science (1)
- # datomic (5)
- # docs (13)
- # emacs (1)
- # fulcro (13)
- # graphql (1)
- # hoplon (20)
- # immutant (3)
- # jobs (1)
- # juxt (12)
- # lein-figwheel (1)
- # luminus (4)
- # off-topic (12)
- # onyx (61)
- # portkey (1)
- # re-frame (21)
- # reagent (26)
- # ring-swagger (38)
- # rum (1)
- # shadow-cljs (222)
- # slack-help (4)
- # spacemacs (11)
- # specter (67)
- # uncomplicate (236)
hey how can we convert this into cljs $(window).load(function() { $(this).joyride(); }) and i tried it like this :component-did-mount #(.load (jq/$ "window") (fn [] (.joyride (jq/$ "#first")))) but it's not working. can any one tell whats the right way?
@dhirensr
I think for load
you can just write (set! (.-onload js/window) main)
anywhere (the main
being your lambda).
As for the joyride
- you should replace jq
with js
.
Also, I see you replaced this
with "#first"
- you should be able to use this
inside component-did-mount
: (fn [] (this-as this (.joyride (js/$ this))))
.
@mkvlr "Reagent extends standard Hiccup in one way: it is possible to "squeeze" elements together by using a > character." If that's the only difference, writing a function to do this should be pretty simple. Or are there any other differences?
@mkvlr what's your use case?
@pesterhazy our pedestal app would like to share some view code with our re-frame app
my gut feeling is that that's probably more complex than it's worth for a little duplication
at least if the views container any dynamic elements
I think it depends on the extend and nature of the template sharing
@pesterhazy you think as long as it’s pure functions that return markup it should be fine?
are the differences to hiccup written down somewhere? We noticed the :style
attribute being different for example…
@mkvlr the differences are pretty minor
but reagent is based on react, which does a bunch of thing internally
e.g. normalize attributes
@mkvlr actually I filed an issue about style
some time ago and it looks like james got around to implementing it in the meantime 🙂 https://github.com/weavejester/hiccup/issues/136
@pesterhazy oh, that’s good to know, thanks!
Is reagent able to do any conditional stylesheet loading? For example, I'd like to load the minified version in prod, but non-min in development. The reagent template has these things specified in a static index.html
file, so I'm wondering how I'd pull this off..
What’s with the “frisk” naming? First re-frisk and now https://github.com/Odinodin/data-frisk-reagent. Does it have a meaning I’m not aware of in English?
@borkdude "to search (a person) for concealed weapons, contraband goods, etc., by feeling the person's clothing" I'm guessing
as in police inspection 🙂