This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-05
Channels
- # adventofcode (8)
- # aleph (42)
- # announcements (4)
- # beginners (157)
- # boot (4)
- # calva (1)
- # cider (6)
- # cljdoc (8)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (50)
- # clojure-europe (9)
- # clojure-italy (16)
- # clojure-nl (2)
- # clojure-russia (6)
- # clojure-spec (59)
- # clojure-uk (25)
- # clojurescript (20)
- # core-async (41)
- # cursive (30)
- # data-science (9)
- # datomic (20)
- # fulcro (28)
- # kaocha (9)
- # nrepl (1)
- # off-topic (3)
- # om (3)
- # pathom (10)
- # re-frame (8)
- # reagent (2)
- # ring-swagger (38)
- # rum (9)
- # shadow-cljs (209)
- # spacemacs (7)
- # tools-deps (11)
- # vim (6)
- # yada (2)
I'm watching them all. I tried following along the first few lectures. Now I'm just watching.
Is there a way to distinguish between when a html5 system alert's onclose function gets run because the browser regains focus and when the close button is clicked?
I am trying to load a foreign-lib in clojurescript which has a export default instead of a global name - how do I require the namespace in this case?
I guess the :global-exports property here only works in case the external JS has a global name exported like above.
is there an easy way to tell with a single function whether something is a cljs data structure vs. a regular ol javascript data structure?
Depends what you mean, but coll?
could suffice in some situations, for detecting a cljs collection.
that might be what i need - i'm looking to always log plain JS, so that should do the job
ah, gotcha. Well, there's also object?
if you want to only log js objects (and not everything that's not a coll)
Question for y'all React rangers out there: I'd like to be able to attach extra handlers to componentDidMount
and other methods on arbitrary React components, whether they're native or some Reagent/Fulcro/other wrapper lib's component... possible?
How do I get at the js component object's lifecycle methods, if the object is passed to my function?
@hoopes not sure what “easy way” means 🙂 https://github.com/binaryage/cljs-devtools/blob/master/src/lib/devtools/formatters/helpers.cljs#L37-L45
the short answer is no, because reagent (and I think fulcro + rum) all have their own way of defining components that aren't actually React Component classes until you render them
hmm. So, there's reagent.core/adapt-react-class
and I'd like to pre-adapt the react class first, with my-lib/my-adapt-react-class
. After I've done my business with it, I'll send it on to reagent.core/adapt-react-class
.
I think I have a plan for reagent.core/create-class
, which just takes a map. I'll provide my/create-class
which takes whatever map you give it and, if you already have a fn in :component-did-mount
, I'll just wrap the fn and put the wrapped fn back on the map, then pass it on to reagent.core/create-class
.