This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-01
Channels
- # arachne (3)
- # bangalore-clj (8)
- # beginners (9)
- # cljsrn (3)
- # clojure (148)
- # clojure-filipino (2)
- # clojure-russia (25)
- # clojure-serbia (3)
- # clojure-spec (14)
- # clojure-uk (61)
- # clojureremote (7)
- # clojurescript (38)
- # clojurewest (2)
- # cursive (2)
- # data-science (9)
- # datomic (4)
- # emacs (4)
- # jobs (6)
- # lein-figwheel (3)
- # leiningen (2)
- # off-topic (1)
- # om (3)
- # onyx (1)
- # pedestal (16)
- # perun (2)
- # powderkeg (1)
- # protorepl (2)
- # re-frame (1)
- # reagent (10)
- # spacemacs (2)
- # unrepl (5)
- # untangled (4)
@credmp https://github.com/Day8/re-frame/blob/master/docs/SubscriptionsCleanup.md#a-final-faq
No wait. Ignore that. Sorry, i got the wrong end of your question.
Yes, you could do something like your suggestion. But that won't be a part of re-frame itself. it will be your layer over the top. Note: there is a #reframe channel which might be a better place to take this.
What is the best way to slurp
a website using just CLJS?
I came across https://gist.github.com/noprompt/9086232 but it uses a clojure macro.
Is it possible to slurp a website without using any clojure, just clojurescript, as I want my reframe app to be pure CLJS?
If I want to tell if a value is a string I use string?
. Is there something analogous to tell if a value is an atom
?
Unfortunately not.
I also tried (isa? x IDeref)
, but it doesn’t work.
clojure.lang.Atom
is not part of Clojurescript, or is it?
cljs.user=> (satisfies? IDeref (atom 1))
true
cljs.user=> (satisfies? IDeref 1)
false
Looks like this will work.Is it also the case in cljs?
You are right, I guess anything that implements that protocol.
@mikethompson yea, I will ask them there… I have not been able to wrap it properly… almost to the point of resorting to a macro 😉
@credmp (fn [x] (:foo x))
can be shortened to just :foo
as keywords are also ifn?
themselves
sure, that is very true, but the re-frame framework uses this setup, the fn is called from the context
because you will always create an fn that just returns the key that you use as a subscription key