This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (3)
- # beginners (98)
- # boot (24)
- # cljs-dev (13)
- # cljsrn (16)
- # clojure (97)
- # clojure-dusseldorf (2)
- # clojure-italy (2)
- # clojure-losangeles (2)
- # clojure-russia (48)
- # clojure-spec (28)
- # clojure-uk (79)
- # clojurescript (79)
- # community-development (2)
- # cursive (4)
- # datomic (35)
- # duct (1)
- # events (1)
- # fulcro (43)
- # heroku (1)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (1)
- # lumo (12)
- # nyc (1)
- # off-topic (6)
- # om (1)
- # pedestal (7)
- # portkey (9)
- # proton (1)
- # re-frame (45)
- # reagent (27)
- # rum (2)
- # shadow-cljs (78)
- # spacemacs (3)
- # specter (2)
- # testing (2)
- # vim (41)
@nxqd there are some edge cases around circular deps (which aren’t allowed anyway) and
Question about generic components in re-frame. How do you guys organize them in the namespaces?
In react I'm used to 'smart' and 'dumb' components, so this would be a dumb comonent, i.e. is not connected to a datasource it self, but receieves everything form its parent.
@karlstefan (there is also #re-frame ) generally you put the component in a namespace with db/events/subs/views sub-namespaces... separating out like that makes for clean dependency resolution even across clj/cljs boundaries (e.g. so you can use re-frame-test to test your event-handlers and subs from clj) https://github.com/Day8/re-frame/wiki/A-Larger-App
(re-pattern (str "(?iu)" substr)) is the case-insensitive modifier broken in ClojureScript?
@darwin actually, replacing re-pattern with js/RegExp. yields the same result, so I’m now looking into
(js/RegExp. substr "ig") unicode is not the important bit here, it’s the case-sensitivity that’s the issue ATM
(.replace s pattern "replacement") worked which leaves me thinking that something is broken with
well, I expected one-liner in REPL which would demonstrate how str/replace does not work for your input
@hkjels I think it's that clojurescript regex doesn't support the global modifier, as it's stateful, which breaks some cljs expectations
@dominicm The snippet I posted works, I just don’t think it should be necessary to use separate code for cljs and clj in this case
the source on http://clojurescript.io for clojure.string/replace is the same as on 1.9.908
in Chrome devtools:
@hkjels btw, if the input to your function is always a normal string (user input?) then it will break if the user types in
. (unless this is intentional)
js/Promise.all transparently accept a PersistentVector instead of an array
I'm guessing because the interface they expect is really an iterable, not an array?
re: destructuring… a few days ago I was wondering if I can get ClojureScript destructuring to “work” on JS map-like objects but I don’t think it does 🙂
Hello! Is anyone using re-frame plus bidi in a cljs application? I have a implementation question about routing
This seems like a really basic question, but I can't find docs anywhere. What is the order of execution for compiled cljs? I am including another library via a script tag and want to make sure it's loaded first. If I have only one such library, I can use onload in the script tag on an extern'd cljs function... but that breaks if there are multiple dependencies. Is there a more idiomatic way?
After hours of reading - shortly after writing this, I realized that the best approach is probably to manual specify order in my HTML file (which guarantees order of execution).
@davclark correct, you cannot specify total namespace ordering, they are ordered based on dependencies which gives only partial ordering (AFAIK)
this is what I recommended in cljs-devtools (prior introduction of
Is it supported to refer to a var in a scoped NPM package by its fully qualified name?
@anmonteiro great! right now it's breaking data.xml's test-matrix for
1.9.0-beta1 but I suppose it will be an easy fix, on the next cljs release ..