This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-02
Channels
- # announcements (1)
- # beginners (15)
- # calva (6)
- # cider (72)
- # clojure (105)
- # clojure-europe (2)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-uk (32)
- # clojurescript (14)
- # code-reviews (10)
- # cursive (8)
- # data-science (2)
- # datomic (38)
- # events (1)
- # fulcro (31)
- # graphql (1)
- # hyperfiddle (47)
- # java (4)
- # jobs (4)
- # off-topic (18)
- # overtone (2)
- # parinfer (12)
- # pathom (19)
- # pedestal (4)
- # philosophy (2)
- # portkey (22)
- # re-frame (42)
- # reagent (1)
- # rum (1)
- # shadow-cljs (36)
- # specter (3)
- # tools-deps (2)
Hi everyone, I've working on a toy project for a while and would love some code reviews / feedbacks on the clojurescript code that I wrote. Thanks. https://github.com/dawran6/markdown-editor
Specifically, I don't particularly like the way that I interact with the dom element here: https://github.com/dawran6/markdown-editor/blob/master/src/markdown_editor/core.cljs#L37-L43
Is there a more idiomatic way of looping through the querySelectorAll results?
Thanks
I think I've seen a "node-seq" implementation at some point (allows consuming nodes via doseq, for, reduce, etc.)
looks like array-seq
will work https://cljs.github.io/api/cljs.core/array-seq
@noisesmith hey thanks a ton! This is very promising. I saw the example in the doc:
(array-seq (js/document.querySelectorAll "div"))
.yeah, looks like it is designed for exactly your use-case
I'll try that shortly 🙂 Also please feel free to look at other parts of the code. Currently it's still very small. Thanks again @noisesmith