Fork me on GitHub
#code-reviews
<
2019-01-02
>
Daw-Ran Liou22:01:43

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

Daw-Ran Liou22:01:45

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

Daw-Ran Liou22:01:12

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

noisesmith22:01:03

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

Daw-Ran Liou22:01:04

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

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

noisesmith22:01:45

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

Daw-Ran Liou22:01:28

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