code-reviews

2019-01-02T22:13:43.012400Z

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

2019-01-02T22:14:45.013300Z

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

2019-01-02T22:16:12.014100Z

Is there a more idiomatic way of looping through the querySelectorAll results?

2019-01-02T22:16:16.014300Z

Thanks

2019-01-02T22:21:03.015100Z

I think I've seen a "node-seq" implementation at some point (allows consuming nodes via doseq, for, reduce, etc.)

2019-01-02T22:22:01.015400Z

looks like array-seq will work https://cljs.github.io/api/cljs.core/array-seq

2019-01-02T22:22:28.015600Z

@dawran6 ^

2019-01-02T22:24:04.016900Z

@noisesmith hey thanks a ton! This is very promising. I saw the example in the doc:

(array-seq (js/document.querySelectorAll "div"))
.

2019-01-02T22:24:45.017400Z

yeah, looks like it is designed for exactly your use-case

2019-01-02T22:36:28.019Z

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