Fork me on GitHub

@miguelb the foreign modules is very alpha. did you try adding a :module-type :commonjs or :module-type :amd to your :foreign-libs map?


What is a simple lein template for a CLJS library project? Details: I have widgets and utility code that I've built on top of re-com for various projects. I'd like to centralize them for reuse. So, I want to move them into their own project. - This project will never run standalone, so I don't need any server component - I want a simple project.clj script that doesn't try to do too much (at least not yet!). I looked at re-com's project.clj but, at 172 lines, it is doing far more than I want to bite off right now. - This code is still evolving, so I'd like to be able to edit it live. Typically, I'll be working on it from within the context of a project using it. So, I don't think this library needs to run figwheel, right? It's code just needs to be visible to the figwheel magic in the client project. - I do want to be able to run standalone tests on this library code, without involving any client project.


When should I use tools.reader.edn and when should I use clojure.edn?


Use clojure.edn if you're in Clojure and tools.reader.edn if you're in ClojureScript


Thanks, Alex


curious why the following function:

(partition-by #(mod % 2)
                      (range 10))
is returning ( (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) ) as opposed to ( (0 2 4 6 8) (1 3 5 7 9) ) am I misunderstanding how partition-by works?


partition-by never re-orders the input


mss maybe you want group-by


oh I see, so since my fn is returning a new value on each invocation of f, it keeps getting split on each invocation


right, exactly


amazing, makes sense. thanks so much for the help